![]() |
Routines |
| Prev: 8C2D | Up: Map | Next: 8C59 |
|
Used by the routine at LOSE_LIFE.
Reached from LOSE_LIFE when a life is lost with none to spare, whatever took it. It blanks the play area, prints GAME OVER across it, and hands over to DRAW_SUMMARY for the three figures underneath, then sits in a counting loop long enough to read them.
Note the second and third instructions: the tile source has to be pointed back at the text font first. During play it holds FONT_DIGITS, the copy biased so that digits index themselves, and anything printed through PLOT_TILE while it is still there comes out as the wrong glyphs entirely.
|
||||
| GAME_OVER | 8C35 | CALL CLEAR_PLAY_AREA | The castle goes; the status panel down the side stays. | |
| 8C38 | LD HL,$BE4C | Back to the text font, or the words below would be gibberish. | ||
| 8C3B | LD ($5E01),HL | |||
| 8C3E | LD HL,$3040 | "GAME OVER", centred above the figures. | ||
| 8C41 | LD DE,GAME_OVER_TEXT | |||
| 8C44 | CALL PRINT_STRING | |||
| 8C47 | CALL DRAW_SUMMARY | TIME, SCORE and the proportion of the castle seen. | ||
|
This entry point is used by the routine at SHOW_END_SCREEN.
|
||||
| END_DELAY | 8C4A | LD B,$14 | A delay, and a long one: twenty times round a full 16-bit count. | |
| 8C4C | LD HL,$0000 | |||
| GAME_OVER_0 | 8C4F | DEC HL | Twenty times 65536 turns of 26 T-states: about ten seconds (9.8 s from here to the title, measured in the simulator). Whether interrupts are on depends on what took the last life. Hunger kills inside FRAME_TICK, which has done a DI, so they are off and FRAMES stands still through this delay and the title screen after it; a creature, a big monster or a mushroom kills from the main loop, with interrupts on, and FRAMES counts all the way through both (measured live: about 500 frames by the title). | |
| 8C50 | LD A,H | |||
| 8C51 | OR L | |||
| 8C52 | JR NZ,GAME_OVER_0 | |||
| 8C54 | DJNZ GAME_OVER_0 | |||
| 8C56 | JP TITLE_AGAIN | |||
| Prev: 8C2D | Up: Map | Next: 8C59 |