![]()  | 
Routines | 
| Prev: 39258 | Up: Map | Next: 39408 | 
| 
 | 
||||
| GameInitialisation | 39264 | CALL ClearBuffers | Call ClearBuffers. | |
| 39267 | XOR A | Set the border to black. | ||
| 39268 | OUT (254),A | |||
| 39270 | CALL ResetAttributes | Call ResetAttributes. | ||
| 39273 | CALL ResetScreen | Call ResetScreen. | ||
| 39276 | CALL 47362 | Call 47362. | ||
| 
 
Set the attributes for the top banner (the whole line is INK:71).
 
 | 
||||
| 39279 | LD HL,22528 | HL=22528 (attribute buffer). | ||
| 39282 | LD BC,8263 | BC=counter:32 INK:71. | ||
| CreateWindow_Loop_Banner | 39285 | LD (HL),C | Write 71 to the attribute buffer. | |
| 39286 | INC L | Move onto the next column. | ||
| 39287 | DJNZ CreateWindow_Loop_Banner | Decrease counter by one and loop back to CreateWindow_Loop_Banner until counter is zero. | ||
| 39289 | CALL PrintBanner | Call PrintBanner. | ||
| 
 
Set the attributes for the score line (the whole line is INK:70).
 
 | 
||||
| 39292 | LD HL,22560 | HL=22560 (attribute buffer). | ||
| 39295 | LD BC,8262 | BC=counter:32 INK:70. | ||
| CreateWindow_Loop_Score | 39298 | LD (HL),C | Write 70 to the attribute buffer. | |
| 39299 | INC L | Move onto the next column. | ||
| 39300 | DJNZ CreateWindow_Loop_Score | Decrease counter by one and loop back to CreateWindow_Loop_Score until counter is zero. | ||
| 39302 | CALL Score_1UP | Call Score_1UP. | ||
| 39305 | CALL Score_2UP | Call Score_2UP. | ||
| 39308 | CALL Score_HI | Call Score_HI. | ||
| 
 
This entry point is used by the routine at GameOver_1UP.
 
 | 
||||
| Game_Restart | 39311 | CALL HandlerGameMenu | Call HandlerGameMenu. | |
| 
 
Writes 0 to every address from 1UP_Score_1 to SecurityCheck.
 
 | 
||||
| 39314 | LD HL,38552 | HL=38552. | ||
| 39317 | LD BC,706 | BC=706. | ||
| 39320 | CALL ClearBuffers_Loop | Call ClearBuffers_Loop. | ||
| 39323 | CALL Score_1UP | Call Score_1UP. | ||
| 39326 | CALL Score_2UP | Call Score_2UP. | ||
| 39329 | LD DE,48453 | DE=MusicData_GameInitialisation. | ||
| 39332 | CALL PlayAudio | Call PlayAudio. | ||
| 39335 | CALL 45524 | Call 45524. | ||
| 
 
This entry point is used by the routine at 39453.
 
 | 
||||
| GameInitialisation_0 | 39338 | LD SP,24576 | SP=GameEntry. | |
| 39341 | EI | Enable interrupts. | ||
| 39342 | LD IX,38670 | IX=38670. | ||
| 
 
This entry point is used by the routine at 39408.
 
 | 
||||
| GameInitialisation_1 | 39346 | LD A,(23672) | C=FRAMES. | |
| 39349 | LD C,A | |||
| 39350 | LD A,(38550) | A=LastFrame. | ||
| 39353 | CP C | |||
| 39354 | JR Z,GameInitialisation_2 | |||
| FrameUpdate | 39356 | DI | Disable interrupts. | |
| 39357 | LD A,(23672) | Store FRAMES at LastFrame. | ||
| 39360 | LD (38550),A | |||
| 39363 | LD A,1 | Set FrameUpdated to 1 (frame has updated). | ||
| 39365 | LD (38551),A | |||
| 39368 | LD (38569),IX | |||
| 39372 | LD IX,38658 | IX=ImmortalData. | ||
| GameInitialisation_2 | 39376 | LD A,R | ||
| 39378 | LD C,A | |||
| 39379 | LD A,(38549) | |||
| 39382 | ADC A,C | |||
| 39383 | LD (38549),A | |||
| 39386 | LD HL,39408 | Push 39408 onto the stack. | ||
| 39389 | PUSH HL | |||
| 39390 | LD BC,39742 | BC=JumpTable. | ||
| 39393 | LD A,(IX+0) | |||
| 39396 | LD L,A | |||
| 39397 | LD H,0 | |||
| 39399 | ADD HL,HL | |||
| 39400 | ADD HL,BC | |||
| 39401 | LD A,(HL) | |||
| 39402 | INC HL | |||
| 39403 | LD H,(HL) | |||
| 39404 | LD L,A | |||
| 39405 | JP IndirectJump | |||
| 
 
View the equivalent code in; 
 
 | 
||||
| Prev: 39258 | Up: Map | Next: 39408 |