Prev: 53982 Up: Map Next: 54397
54261: Start Game
Used by the routine at DemoEntryPoint.
The game always starts with the cursor inside the home box.
This is position 2/ 2:
demo-cursor-02-02
StartGame 54261 LD A,2 Write 2 to:
54263 LD (54604),A
54266 LD (54605),A
54269 LD (54602),A
54272 LD (54603),A
54275 LD A,9 Write 9 to *54608.
54277 LD (54608),A
54280 LD HL,54595 HL=Lives.
54283 DEC (HL) Decrease *HL by one.
54284 JP Z,StartGame_2 Jump to StartGame_2 until *HL is equal to 0.
54287 LD HL,54614 HL=54614.
54290 LD (HL),0 Write 0 to *HL.
54292 CALL 61243 Call 61243.
54295 LD HL,(54670) HL=*54670.
54298 LD (HL),45 Write INK: CYAN, PAPER: CYAN to *HL.
54300 INC HL Increment HL by one.
54301 LD (HL),45 Write INK: CYAN, PAPER: CYAN to *HL.
54303 INC HL Increment HL by one.
54304 LD (54670),HL Write HL to *54670.
54307 LD DE,30 HL+=0030.
54310 ADD HL,DE
54311 LD (HL),45 Write INK: CYAN, PAPER: CYAN to *HL.
54313 INC HL Increment HL by one.
54314 LD (HL),45 Write INK: CYAN, PAPER: CYAN to *HL.
54316 LD HL,54614 HL=54614.
54319 SET 0,(HL) Set bit 0 of *HL.
This entry point is used by the routine at 53982.
StartGame_0 54321 LD A,(54614) A=*54614.
54324 AND %11110001 Keep only bits 0, 4-7.
54326 LD (54614),A Write A to *54614.
54329 LD A,(54604) Write *54604 to *54600.
54332 LD (54600),A
54335 LD A,(54605) Write *54605to *54601.
54338 LD (54601),A
54341 LD A,(54592) Write *54592to *54606.
54344 LD (54606),A
54347 LD A,(54609) Jump to StartGame_1 if *54609 is not equal to 0.
54350 CP 0
54352 JR NZ,StartGame_1
54354 LD A,(54608) Jump to StartGame_1 if *54608 is equal to 9.
54357 CP 9
54359 JR Z,StartGame_1
54361 CALL Display_PlayerCursor Call Display_PlayerCursor.
StartGame_1 54364 CALL 55177 Call 55177.
54367 JP 53982 Jump to 53982.
StartGame_2 54370 LD HL,54613 HL=54613.
54373 SET 7,(HL) Set bit 7 of *HL.
54375 LD B,75 B=75.
StartGame_3 54377 HALT Halt operation (suspend CPU until the next interrupt).
54378 DJNZ StartGame_3 Decrease counter by one and loop back to StartGame_3 until counter is zero.
54380 DI Disable interrupts.
54381 CALL 59649 Call 59649.
54384 LD BC,0 BC=0000.
StartGame_4 54387 DEC BC Decrease BC by one.
54388 LD A,B Jump to StartGame_4 until BC is equal to 0.
54389 OR C
54390 JR NZ,StartGame_4
54392 POP IY Restore IY from the stack.
54394 JP DemoEntryPoint_0 Jump to DemoEntryPoint_0.
Prev: 53982 Up: Map Next: 54397