![]() |
Routines |
| Prev: 65283 | Up: Map | Next: 65490 |
|
Checks three checksums of the loading-screen bitmap, then starts the game.
|
||||
| Entry_Point | 65440 | XOR A | Set the border to BLACK. | |
| 65441 | OUT (254),A | |||
| 65443 | LD B,3 | Set the third counter to 3 in B. | ||
| 65445 | LD SP,24240 | Set the stack pointer to 24240. | ||
| 65448 | LD HL,16384 | Point HL at 16384 (screen buffer). | ||
|
Checksum one third of the bitmap.
|
||||
| Entry_Point_0 | 65451 | LD DE,2048 | Set the byte counter to 2048 in DE. | |
| 65454 | XOR A | Clear the checksum. | ||
| Entry_Point_1 | 65455 | XOR (HL) | Merge the bitmap byte into the checksum and advance, until the low byte of the byte counter is zero. | |
| 65456 | INC HL | |||
| 65457 | DEC DE | |||
| 65458 | DEC E | |||
| 65459 | INC E | |||
| 65460 | JR NZ,Entry_Point_1 | |||
| 65462 | DEC D | Jump to Entry_Point_1 if the high byte of the byte counter is not zero. | ||
| 65463 | INC D | |||
| 65464 | JR NZ,Entry_Point_1 | |||
| 65466 | PUSH AF | Stash the checksum on the stack. | ||
| 65467 | 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).
|
||||
| 65469 | POP AF | Restart the machine if the checksum is not 124. | ||
| 65470 | CP 124 | |||
| 65472 | JP NZ,0 | |||
| 65475 | POP AF | Restart the machine if the checksum is not 56. | ||
| 65476 | CP 56 | |||
| 65478 | JP NZ,0 | |||
| 65481 | POP AF | Restart the machine if the checksum is not 144. | ||
| 65482 | CP 144 | |||
| 65484 | JP NZ,0 | |||
| 65487 | JP Start_Game | Jump to Start_Game. | ||
| Prev: 65283 | Up: Map | Next: 65490 |