![]() |
Routines |
| Prev: FF03 | Up: Map | Next: FFD2 |
|
Checks three checksums of the loading-screen bitmap, then starts the game.
|
||||
| Entry_Point | FFA0 | XOR A | Set the border to BLACK. | |
| FFA1 | OUT ($FE),A | |||
| FFA3 | LD B,$03 | Set the third counter to 03 in B. | ||
| FFA5 | LD SP,$5EB0 | Set the stack pointer to 5EB0. | ||
| FFA8 | LD HL,$4000 | Point HL at 4000 (screen buffer). | ||
|
Checksum one third of the bitmap.
|
||||
| Entry_Point_0 | FFAB | LD DE,$0800 | Set the byte counter to 0800 in DE. | |
| FFAE | XOR A | Clear the checksum. | ||
| Entry_Point_1 | FFAF | XOR (HL) | Merge the bitmap byte into the checksum and advance, until the low byte of the byte counter is zero. | |
| FFB0 | INC HL | |||
| FFB1 | DEC DE | |||
| FFB2 | DEC E | |||
| FFB3 | INC E | |||
| FFB4 | JR NZ,Entry_Point_1 | |||
| FFB6 | DEC D | Jump to Entry_Point_1 if the high byte of the byte counter is not zero. | ||
| FFB7 | INC D | |||
| FFB8 | JR NZ,Entry_Point_1 | |||
| FFBA | PUSH AF | Stash the checksum on the stack. | ||
| FFBB | DJNZ Entry_Point_0 | Decrease the third counter by one and loop back to Entry_Point_0 until all three thirds are done. | ||
|
Compare the three checksums (last third first).
|
||||
| FFBD | POP AF | Restart the machine if the checksum is not 7C. | ||
| FFBE | CP $7C | |||
| FFC0 | JP NZ,$0000 | |||
| FFC3 | POP AF | Restart the machine if the checksum is not 38. | ||
| FFC4 | CP $38 | |||
| FFC6 | JP NZ,$0000 | |||
| FFC9 | POP AF | Restart the machine if the checksum is not 90. | ||
| FFCA | CP $90 | |||
| FFCC | JP NZ,$0000 | |||
| FFCF | JP Start_Game | Jump to Start_Game. | ||
| Prev: FF03 | Up: Map | Next: FFD2 |