Routines |
Prev: 698E | Up: Map | Next: 6A17 |
Called from the main loop at 6229.
|
||||
69A4 | LD HL,($7CC4) | Pick up the bell's location in the current maze. | ||
69A7 | LD A,H | Has Horace already sounded the alarm? | ||
69A8 | OR L | |||
69A9 | JR NZ,$69D0 | Jump if not. | ||
Horace has already sounded the alarm. Produce an appropriate delay in place of the bell sound.
|
||||
69AB | LD A,($7C62) | Pick up the game speed parameter in A. | ||
69AE | LD E,A | HL=350+30*A. | ||
69AF | LD HL,$015E | |||
69B2 | LD BC,$001E | |||
69B5 | ADD HL,BC | |||
69B6 | DEC E | |||
69B7 | JR NZ,$69B2 | |||
69B9 | XOR A | Clear A for no apparent reason. | ||
69BA | LD A,($6B0A) | Pick up the active guard counter (0-3) in A. | ||
69BD | RLA | Subtract 128*A from HL. | ||
69BE | RLA | |||
69BF | RLA | |||
69C0 | RLA | |||
69C1 | RLA | |||
69C2 | RLA | |||
69C3 | LD B,$00 | |||
69C5 | LD C,A | |||
69C6 | SBC HL,BC | |||
69C8 | SBC HL,BC | |||
69CA | PUSH HL | Copy HL to BC. | ||
69CB | POP BC | |||
69CC | CALL $6B0C | Wait for 26*BC+5 T states. | ||
69CF | RET | |||
Horace has not sounded the alarm yet. Produce an appropriate bell sound if necessary.
|
||||
69D0 | LD A,($7CC6) | Pick up the bell animation frame counter. | ||
69D3 | AND $3F | Keep only bits 0-5. | ||
69D5 | CP $00 | Is the frame counter a multiple of 64 at the moment? (This instruction is redundant.) | ||
69D7 | JR NZ,$69F6 | Jump if not. | ||
69D9 | LD HL,$7C69 | Pick up the sound on/off indicator in A. | ||
69DC | LD A,(HL) | |||
69DD | CP $1F | Is the sound on? | ||
69DF | JR NZ,$69AB | Jump if not. | ||
69E1 | LD DE,$0016 | Call the ROM to make a short sound effect. | ||
69E4 | LD HL,$0193 | |||
69E7 | CALL $03B5 | |||
69EA | DI | Disable interrupts after the ROM call. | ||
69EB | LD DE,$001A | Call the ROM again to make another short sound effect. | ||
69EE | LD HL,$0168 | |||
69F1 | CALL $03B5 | |||
69F4 | DI | Disable interrupts after the ROM call. | ||
69F5 | RET | |||
69F6 | CP $20 | Is the bell animation frame counter a multiple of 32 at the moment? | ||
69F8 | JR NZ,$69AB | Jump if not. | ||
69FA | LD HL,$7C69 | Pick up the sound on/off indicator in A. | ||
69FD | LD A,(HL) | |||
69FE | CP $1F | Is the sound on? | ||
6A00 | JR NZ,$69AB | Jump if not. | ||
6A02 | LD DE,$001A | Call the ROM to make a short sound effect. | ||
6A05 | LD HL,$0168 | |||
6A08 | CALL $03B5 | |||
6A0B | DI | Disable interrupts after the ROM call. | ||
6A0C | LD DE,$0016 | Call the ROM again to make another short sound effect. | ||
6A0F | LD HL,$0193 | |||
6A12 | CALL $03B5 | |||
6A15 | DI | Disable interrupts after the ROM call. | ||
6A16 | RET |
Prev: 698E | Up: Map | Next: 6A17 |