Prev: FD00 Up: Map Next: FDCE
FD80: Abort the game after pressing break (CAPS + SPACE)
Used by the routine at CAE7.
On initialisation, HL=Copied_5B80. The code at FD80 and FD82 is not present on the Dinamic release.
FD80 JR $FD84 Jump to FD84.
This code is the main entry point for the Gremlin Graphics release. The Dinamic release begins at 5D00.
FD82 JR $FDA8 Jump to FDA8, bypassing the "cheat mode" code
Code continues from FD80.
FD84 LD A,$FD Read from the keyboard;
Port Number Bit
0 1 2 3 4
FD A S D F G
FD86 IN A,($FE)
FD88 RRA
FD89 JR NC,$FD8D Jump to FD8D if "A" is pressed.
FD8B JR $FDA3 Jump to FDA3.
FD8D LD A,$BF Read from the keyboard;
Port Number Bit
0 1 2 3 4
BF ENTER L K J H
FD8F IN A,($FE)
FD91 RRA Jump to FD95 if "ENTER" is pressed.
FD92 JR NC,$FD95
FD94 RET Return.
FD95 LD DE,$5B80 DE=Print_TwoToneText_Alias.
FD98 LD BC,$0040 BC=40.
FD9B LDIR Copy the status flags into Print_TwoToneText_Alias.
FD9D LD HL,($5B86) Put 255 lives in the copy of the life counter so the game will start with this many.
FDA0 LD (HL),$FF
FDA2 RET Return.
FDA3 LD SP,$5FF0 SP=5FF0.
On the Dinamic release, the jump is to 5D30.
FDA6 JR $FDBC Jump to FDBC.
FDA8 EI Enable interrupts.
FDA9 DEFS $08 No-operation.
Oddly enable both keyboard and kempston joystick input methods at the same time.
FDB1 LD HL,$0101 Write 0101 to Controller.
FDB4 LD ($5CB0),HL
Set the border to black and blank the screen buffer.
FDB7 LD A,$00 A=00.
FDB9 CALL $229B Call BORDER routine (not from the start).
Main game loop.
On the Dinamic release, this code is at 5D30.
FDBC LD HL,$4000 Writes 00 to all 1AFF bytes of the screen buffer (i.e. "blanks it").
FDBF LD DE,$4001
FDC2 LD BC,$1AFF
FDC5 LD (HL),$00
FDC7 LDIR
FDC9 CALL New_Game Run the game.
FDCC JR $FDBC Jump back to FDBC to run another game.
Prev: FD00 Up: Map Next: FDCE