| Chase H.Q. | Routines |
| Prev: E600 | Up: Map | Next: E8FE |
|
|
||||
| entrypt_48k | E810 | XOR A | Set 128K flag to zero (48K mode) | |
| E811 | LD B,$03 | 3 relocations to do in 48K mode | ||
| E813 | JP entrypt_common | Jump to common | ||
| entrypt_128k | E816 | CALL clear_game_attrs | Call clear_game_attrs | |
| E819 | LD A,$01 | Set 128K flag to one (128K mode) | ||
| E81B | LD B,$05 | 5 relocations to do in 128K mode | ||
| entrypt_common | E81D | LD ($A139),A | Store 128K mode flag | |
| E820 | LD SP,$0000 | Put stack at end of RAM | ||
| E823 | PUSH BC | Preserve the count in B | ||
| E824 | LD HL,$F5BE | Copy status panel initial pixels to the top of the screen | ||
| E827 | LD DE,$4000 | |||
| E82A | LD BC,$0800 | |||
| E82D | LDIR | |||
| E82F | LD DE,$5800 | Copy status panel initial attributes to the top of the attribute file | ||
| E832 | INC B | |||
| E833 | LDIR | |||
| E835 | AND A | Call stop_the_tape_48k if not in 128K mode | ||
| E836 | CALL Z,stop_the_tape_48k | |||
|
Now that "stop the tape" has run we can relocate the game into position.
|
||||
| E839 | POP BC | Restore B | ||
| E83A | LD HL,$E858 | Point HL at relocations | ||
| entrypt_relocate_loop | E83D | PUSH BC | Preserve B | |
| E83E | LD E,(HL) | DE = wordat(HL); HL += 2 | ||
| E83F | INC HL | |||
| E840 | LD D,(HL) | |||
| E841 | INC HL | |||
| E842 | PUSH DE | Stack source pointer | ||
| E843 | LD E,(HL) | DE = wordat(HL); HL += 2 -- Destination pointer | ||
| E844 | INC HL | |||
| E845 | LD D,(HL) | |||
| E846 | INC HL | |||
| E847 | LD C,(HL) | BC = wordat(HL); HL += 2 -- Count | ||
| E848 | INC HL | |||
| E849 | LD B,(HL) | |||
| E84A | INC HL | |||
| E84B | EX (SP),HL | Exchange top of stack and HL. HL is now source pointer | ||
| E84C | LDIR | Copy | ||
| E84E | POP HL | Restore base pointer and count | ||
| E84F | POP BC | |||
| E850 | DJNZ entrypt_relocate_loop | Loop while B > 0 | ||
| E852 | LD SP,$ED28 | Set up the stack | ||
| E855 | JP bootstrap | Exit via bootstrap -- start the game | ||
| relocations | E858 | DEFW data_e88e | Copy 24 bytes from data_e88e to $EC00 | |
| E85A | DEFW $EC00 | |||
| E85C | DEFW $0018 | |||
| E85E | DEFW square_zoom_in_mask | Copy 40 bytes from square_zoom_in_mask to $EB00 | ||
| E860 | DEFW $EB00 | |||
| E862 | DEFW $0028 | |||
| E864 | DEFW diamond_zoom_in_mask | Copy 48 bytes from diamond_zoom_in_mask to $EA00 | ||
| E866 | DEFW $EA00 | |||
| E868 | DEFW $0030 | |||
| E86A | DEFW page_in_stage_128k | Copy 926 bytes from page_in_stage_128k onwards to $8014 [128K only] | ||
| E86C | DEFW load_stage | |||
| E86E | DEFW $039E | |||
| E870 | DEFW hooks_128k | Copy 24 bytes (3 bytes * 8 hooks) from hooks_128k to hooks at start_siren_hook [128K only] | ||
| E872 | DEFW start_siren_hook | |||
| E874 | DEFW $0018 | |||
| hooks_128k | E876 | JP $8045 | Replaces 48K start_siren_hook | |
| E879 | JP $805D | Replaces 48K play_engine_or_siren_sfx_hook | ||
| E87C | JP load_stage_2 | Replaces 48K silence_audio_hook | ||
| E87F | JP $8096 | Replaces 48K write_registers_hook | ||
| E882 | JP $80E5 | Replaces 48K setup_engine_sfx_hook | ||
| E885 | JP tl_80ee | Replaces 48K play_engine_sfx_hook | ||
| E888 | JP $8136 | Replaces 48K play_speech_hook | ||
| E88B | JP $820F | Replaces 48K attract_mode_hook | ||
|
Copied to $EC00 - transitions?
|
||||
| data_e88e | E88E | DEFB $06 | ||
| E88F | DEFW $EAF8 | |||
| E891 | DEFB $0C | |||
| E892 | DEFW $E35C | |||
| E894 | DEFB $08 | |||
| E895 | DEFW $E3B4 | |||
| E897 | DEFB $07 | |||
| E898 | DEFW $E9F8 | |||
| E89A | DEFB $06 | |||
| E89B | DEFW $EB28 | |||
| E89D | DEFB $0C | |||
| E89E | DEFW $E3BC | |||
| E8A0 | DEFB $08 | |||
| E8A1 | DEFW $E3F4 | |||
| E8A3 | DEFB $07 | |||
| E8A4 | DEFW $EA30 | |||
|
Square zoom in animation mask (8x8, 5 frames)
|
||||
| square_zoom_in_mask | E8A6 | DEFB $00,$00,$00,$10,$00,$00,$00,$00 | ||
| E8AE | DEFB $00,$00,$00,$18,$18,$00,$00,$00 | |||
| E8B6 | DEFB $00,$00,$3C,$3C,$3C,$3C,$00,$00 | |||
| E8BE | DEFB $00,$7E,$7E,$7E,$7E,$7E,$7E,$00 | |||
| E8C6 | DEFB $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF | |||
|
Diamond zoom in animation mask (8x8, 6 frames)
|
||||
| diamond_zoom_in_mask | E8CE | DEFB $81,$42,$24,$18,$18,$24,$42,$81 | ||
| E8D6 | DEFB $81,$C3,$66,$3C,$3C,$66,$C3,$81 | |||
| E8DE | DEFB $C3,$E7,$7E,$3C,$3C,$7E,$E7,$C3 | |||
| E8E6 | DEFB $C3,$E7,$FF,$7E,$7E,$FF,$E7,$C3 | |||
| E8EE | DEFB $E7,$FF,$FF,$7E,$7E,$FF,$FF,$E7 | |||
| E8F6 | DEFB $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF | |||
| Prev: E600 | Up: Map | Next: E8FE |