Prev: 83B5 Up: Map Next: 8401
83CD: Bootstrap / Uber main loop
Used by the routine at E839.
Builds a table of flipped bytes at $EF00.
bootstrap 83CD LD HL,$EF00 Point HL at $EF00
flip_table_loop 83D0 LD B,$08 8 iterations
83D2 LD A,L A is the index into the table
flip_byte_loop 83D3 RLCA Shift a bit out of A leftwards and into C rightwards
83D4 RR C
83D6 DJNZ flip_byte_loop Loop for 8 bits
83D8 LD (HL),C Write C out and advance
83D9 INC L
83DA JR NZ,flip_table_loop Loop for 256 iterations (when L overflows)
83DC CALL attract_mode_hook Call attract_mode_hook
83DF XOR A overtake_bonus = 0
83E0 LD ($A13C),A
Clear score_bcd and retry_count.
83E3 LD HL,$8002
83E6 LD B,$05
bootstrap_0 83E8 LD (HL),A
83E9 INC HL
83EA DJNZ bootstrap_0
83EC INC A wanted_stage_number = 1
83ED LD (HL),A
83EE INC A credits = 2
83EF LD ($A13D),A
83F2 CALL main_loop Call the main loop
83F5 LD A,($A139) Call relocated plsp_f3b6_128k (speech) if in 128K mode
83F8 AND A
83F9 LD HL,$C003
83FC CALL NZ,$81AA
83FF JR bootstrap Loop
Prev: 83B5 Up: Map Next: 8401