Skip to content

Disk change in emulation mode only works for disks 1 to 7 #159

@Konamiman

Description

@Konamiman

The routine that checks if a disk change key is pressed when running in floppy disk emulation mode has a bug that makes it impossible to switch to any disk with index higher that 7. This impacts games with a big number of disks like Illusion City.

The bug is in the CHGLOOP routine in drv.mac:

    ;HLDEC = key statuses
    ;B = Keys left to check
    ;A = Current key index
    ;We do an initial rotation because we want to start at key 1.
CHGLOOP:
    sra c
    rr e
    rr d
    rr l
    rr h
    bit 0,c
    ret nz

    inc a
    djnz CHGLOOP

The sequence of bit rotations is wrong and will effectively only take in account the bits in register C (keys 0 to 7).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions