![]() |
Routines |
| Prev: 63E0 | Up: Map | Next: 6416 |
|
Used by the routine at StartGame.
|
||||
| PlayersInit | 63F0 | LD B,$02 | B=02 (counter; both players). | |
| PlayersInit_Loop | 63F2 | PUSH BC | Stash BC on the stack. | |
| 63F3 | XOR A | Write 00 to 1UP_Level. | ||
| 63F4 | LD ($5F2D),A | |||
|
Set both players starting lives.
|
||||
| 63F7 | LD A,$04 | Write 04 to 1UP_Lives. | ||
| 63F9 | LD ($5F2E),A | |||
| 63FC | CALL ChangePlayer | Call ChangePlayer to swap the player data between 1UP and 2UP players. | ||
| 63FF | POP BC | Restore BC from the stack. | ||
| 6400 | DJNZ PlayersInit_Loop | Decrease counter by one and loop back to PlayersInit_Loop until counter is zero. | ||
|
Note this is +01 to 63F7 as you "spend a life", and 1UP goes first.
|
||||
| 6402 | LD A,$05 | Write 05 to 2UP_Lives. | ||
| 6404 | LD ($5F32),A | |||
|
Default to writing FF to 2UP_Level (this is a 1UP game).
|
||||
| 6407 | LD A,$FF | Write FF to 2UP_Level. | ||
| 6409 | LD ($5F31),A | |||
|
Handle 2UP game.
|
||||
| 640C | LD A,($5F0C) | Return if bit 0 of GameOptions is not set (i.e. if this is a 1UP game). | ||
| 640F | AND %00000001 | |||
| 6411 | RET NZ | |||
| 6412 | LD ($5F32),A | Else, write it to 2UP_Lives. | ||
| 6415 | RET | Return. | ||
| Prev: 63E0 | Up: Map | Next: 6416 |