Routines |
Prev: 53F6 | Up: Map | Next: 54F2 |
Continues from 53B1.
|
||||
54A0 | CALL $71E2 | Wait for a keypress, and collect its ASCII code in A | ||
54A3 | JR Z,$54A0 | |||
54A5 | OR $20 | Convert the keypress to lower case | ||
54A7 | CP $63 | Was 'c' (Cursor) pressed? | ||
54A9 | JR Z,$54C9 | Jump if so | ||
54AB | CP $6E | Was 'n' (None) pressed? | ||
54AD | JR Z,$54C9 | Jump if so | ||
54AF | CP $6B | Was 'k' (Kempston) pressed? | ||
54B1 | JR NZ,$54BA | Jump if not | ||
54B3 | LD A,$01 | Set 7FEC to 1: using Kempston | ||
54B5 | LD ($7FEC),A | |||
54B8 | JR $54C9 | |||
54BA | CP $69 | Was 'i' (Int2) pressed? | ||
54BC | JR NZ,$54A0 | Jump back to wait for another keypress if not | ||
54BE | LD HL,$53F6 | Copy the 10-byte table at 53F6 into the keypress offset table at E500 if Int2 is being used | ||
54C1 | LD DE,$E500 | |||
54C4 | LD BC,$000A | |||
54C7 | LDIR | |||
The input method has been established. Now prepare the screen for the cast of characters.
|
||||
54C9 | LD HL,$B701 | Draw a line (the catwalk) across the screen, and set byte 0x01 of each character's buffer (which holds the character's x-coordinate) to a number between 1 and 32 (so that they are off-screen: the column of the play area at the far left of the screen, stored at 7FFF, was set to 128 earlier on) | ||
54CC | LD DE,$4880 | |||
54CF | LD B,$20 | |||
54D1 | LD A,$FF | |||
54D3 | LD (HL),B | |||
54D4 | LD (DE),A | |||
54D5 | INC H | |||
54D6 | INC E | |||
54D7 | DJNZ $54D3 | |||
54D9 | LD HL,$D202 | Set byte 0x02 of ERIC's character buffer (which holds his y-coordinate) to 8; this will be the y-coordinate of the characters as they proceed along the catwalk | ||
54DC | LD (HL),$08 | |||
54DE | LD A,$F8 | Message 0xF8: 'THE CHARACTERS' | ||
54E0 | LD HL,$4040 | Print this message | ||
54E3 | CALL $50BC | |||
54E6 | CALL $52A0 | Display the main characters and let the user change their names | ||
This entry point is used by the routine at 55A0.
|
||||
54E9 | LD HL,$50AA | Do the POKEs specified by the table at 50AA | ||
54EC | CALL $53A0 | |||
54EF | JP $F6D5 | Start the game |
Prev: 53F6 | Up: Map | Next: 54F2 |