![]() |
Routines |
| Prev: 9301 | Up: Map | Next: 9532 |
|
|
||||||||||||||||||||
| GameEntry | 9470 | LD HL,$FAF4 | Write FAF4 to CHARS. | |||||||||||||||||
| 9473 | LD ($5C36),HL | |||||||||||||||||||
| 9476 | LD A,$01 | Write 01 to DF_SZ. | ||||||||||||||||||
| 9478 | LD ($5C6B),A | |||||||||||||||||||
| 947B | LD A,$01 | Write 01 to ControlMethod. | ||||||||||||||||||
| 947D | LD ($5BA8),A | |||||||||||||||||||
|
This entry point is used by the routines at InstructionsPrint, BestScoresPrint and StartGame.
|
||||||||||||||||||||
| GameEntry_0 | 9480 | LD HL,$4000 | Writes 00 to all 1800 screen buffer address locations (clears the screen). | |||||||||||||||||
| 9483 | LD DE,$4001 | |||||||||||||||||||
| 9486 | LD (HL),$00 | |||||||||||||||||||
| 9488 | LD BC,$17FF | |||||||||||||||||||
| 948B | LDIR | |||||||||||||||||||
| 948D | LD A,$07 | Write 07 to BORDCR. | ||||||||||||||||||
| 948F | LD ($5C48),A | |||||||||||||||||||
| 9492 | XOR A | Set the border colour to BLACK. | ||||||||||||||||||
| 9493 | OUT ($FE),A | |||||||||||||||||||
| 9495 | LD A,$03 | Write 03 to TemporaryCounter. | ||||||||||||||||||
| 9497 | LD ($5BBA),A | |||||||||||||||||||
| 949A | CALL $955A | Call 955A. | ||||||||||||||||||
| 949D | CALL TitleScreenPrint | Call TitleScreenPrint. | ||||||||||||||||||
| 94A0 | LD A,($5BA8) | If ControlMethod is 01 jump to TitleScreenInit. | ||||||||||||||||||
| 94A3 | CP $01 | |||||||||||||||||||
| 94A5 | JP Z,TitleScreenInit | |||||||||||||||||||
| 94A8 | LD A,($5BA8) | If ControlMethod is 02 jump to Input_KempstonJoystick. | ||||||||||||||||||
| 94AB | CP $02 | |||||||||||||||||||
| 94AD | JP Z,Input_KempstonJoystick | |||||||||||||||||||
| 94B0 | LD A,($5BA8) | If ControlMethod is 03 jump to Input_ProtekJoystick. | ||||||||||||||||||
| 94B3 | CP $03 | |||||||||||||||||||
| 94B5 | JP Z,Input_ProtekJoystick | |||||||||||||||||||
| 94B8 | LD A,($5BA8) | If ControlMethod is 05 jump to Input_Interface2. | ||||||||||||||||||
| 94BB | CP $05 | |||||||||||||||||||
| 94BD | JP Z,Input_Interface2 | |||||||||||||||||||
|
Handles selecting "1. KEYBOARD".
|
||||||||||||||||||||
| TitleSelectInput | 94C0 | LD A,$F7 | Read from the keyboard;
|
|||||||||||||||||
| 94C2 | IN A,($FE) | |||||||||||||||||||
| 94C4 | AND %00000001 | Keep only bit 0. | ||||||||||||||||||
| 94C6 | JP Z,InputTest_Keyboard | If "1" was pressed then jump to InputTest_Keyboard. | ||||||||||||||||||
|
Handles selecting "2. KEMPSTON JOYSTICK".
|
||||||||||||||||||||
| 94C9 | LD A,$F7 | Read from the keyboard;
|
||||||||||||||||||
| 94CB | IN A,($FE) | |||||||||||||||||||
| 94CD | AND %00000010 | Keep only bit 1. | ||||||||||||||||||
| 94CF | JP Z,InputTest_KempstonJoystick | If "2" was pressed then jump to InputTest_KempstonJoystick. | ||||||||||||||||||
|
Handles selecting "3. PROTEK JOYSTICK".
|
||||||||||||||||||||
| 94D2 | LD A,$F7 | Read from the keyboard;
|
||||||||||||||||||
| 94D4 | IN A,($FE) | |||||||||||||||||||
| 94D6 | AND %00000100 | Keep only bit 2. | ||||||||||||||||||
| 94D8 | JP Z,InputTest_ProtekJoystick | If "3" was pressed then jump to InputTest_ProtekJoystick. | ||||||||||||||||||
|
Handles selecting "4. INTERFACE 2".
|
||||||||||||||||||||
| 94DB | LD A,$F7 | Read from the keyboard;
|
||||||||||||||||||
| 94DD | IN A,($FE) | |||||||||||||||||||
| 94DF | AND %00001000 | Keep only bit 3. | ||||||||||||||||||
| 94E1 | JP Z,InputTest_Interface2 | If "4" was pressed then jump to InputTest_Interface2. | ||||||||||||||||||
|
Handles ... cheat codes?
|
||||||||||||||||||||
| CHEATCODES | 94E4 | LD A,$FD | Read from the keyboard;
|
|||||||||||||||||
| 94E6 | IN A,($FE) | |||||||||||||||||||
| 94E8 | AND %00000011 | Keep only bits 0-1. | ||||||||||||||||||
| 94EA | JP Z,$992A | If "A" and "S" was pressed then jump to 992A. | ||||||||||||||||||
| 94ED | LD A,$FD | Read from the keyboard;
|
||||||||||||||||||
| 94EF | IN A,($FE) | |||||||||||||||||||
| 94F1 | AND %00000001 | Keep only bit 0. | ||||||||||||||||||
| 94F3 | JP Z,$9944 | If "A" was pressed then jump to 9944. | ||||||||||||||||||
|
Handles selecting "5. INSTRUCTIONS".
|
||||||||||||||||||||
| 94F6 | LD A,$F7 | Read from the keyboard;
|
||||||||||||||||||
| 94F8 | IN A,($FE) | |||||||||||||||||||
| 94FA | AND %00010000 | Keep only bit 4. | ||||||||||||||||||
| 94FC | JP Z,InstructionsPrint | If "5" was pressed then jump to InstructionsPrint. | ||||||||||||||||||
|
Handles selecting "6. PLAY".
|
||||||||||||||||||||
| 94FF | LD A,$EF | Read from the keyboard;
|
||||||||||||||||||
| 9501 | IN A,($FE) | |||||||||||||||||||
| 9503 | AND %00010000 | Keep only bit 4. | ||||||||||||||||||
| 9505 | JP Z,StartGame | If "6" was pressed then jump to StartGame. | ||||||||||||||||||
| 9508 | LD HL,($5B99) | Increment the value at RandomNumberSeed by one. | ||||||||||||||||||
| 950B | INC HL | |||||||||||||||||||
| 950C | LD ($5B99),HL | |||||||||||||||||||
| 950F | LD A,$1F | A=1F. | ||||||||||||||||||
| 9511 | CP H | |||||||||||||||||||
| 9512 | CALL Z,ResetRandomSeed | |||||||||||||||||||
| 9515 | LD HL,($5BB8) | Increment the value at TemporaryAddress by one. | ||||||||||||||||||
| 9518 | INC HL | |||||||||||||||||||
| 9519 | LD ($5BB8),HL | |||||||||||||||||||
| 951C | XOR A | A=00. | ||||||||||||||||||
| 951D | CP H | |||||||||||||||||||
| 951E | JP NZ,TitleSelectInput | |||||||||||||||||||
| 9521 | CP L | |||||||||||||||||||
| 9522 | JP NZ,TitleSelectInput | |||||||||||||||||||
| 9525 | LD A,($5BBA) | Increment the value at TemporaryCounter by one. | ||||||||||||||||||
| 9528 | DEC A | |||||||||||||||||||
| 9529 | LD ($5BBA),A | |||||||||||||||||||
| 952C | JP NZ,TitleSelectInput | |||||||||||||||||||
| 952F | JP BestScoresPrint | Jump to BestScoresPrint. | ||||||||||||||||||
| Prev: 9301 | Up: Map | Next: 9532 |