Routines |
Prev: FE52 | Up: Map | Next: FE75 |
Used by the routine at 6AA7. Makes a sound effect just after ERIC has been knocked over or pushed out of his seat.
|
||||||||||||||
FE57 | CP $27 | Return (to 6AD7) unless ERIC has just been knocked over | ||||||||||||
FE59 | RET NZ | |||||||||||||
FE5A | LD HL,$0113 | A=0x02 (initial border colour: red), H=0x01 (pitch adjustment), L=0x13 (border alternates red/blue), D=0x00 (duration), E=0x00 (initial pitch) | ||||||||||||
FE5D | LD DE,$0000 | |||||||||||||
FE60 | LD A,$02 | |||||||||||||
This entry point is used by the routines at E4EC (to make the 'hit a shield' sound effect) and FE75 (to make the catapult sound effect) with the following parameters prepared:
|
||||||||||||||
FE62 | XOR L | Flip the border colour and the state of the speaker | ||||||||||||
FE63 | OUT ($FE),A | |||||||||||||
FE65 | LD B,E | Pitch delay | ||||||||||||
FE66 | DJNZ $FE66 | |||||||||||||
FE68 | LD B,A | Save A temporarily | ||||||||||||
FE69 | LD A,E | Adjust the pitch | ||||||||||||
FE6A | ADD A,H | |||||||||||||
FE6B | LD E,A | |||||||||||||
FE6C | LD A,B | Restore A | ||||||||||||
FE6D | DEC D | Decrement the duration counter | ||||||||||||
FE6E | JR NZ,$FE62 | Jump back unless the sound effect is finished | ||||||||||||
FE70 | LD A,$01 | Make the border blue before returning | ||||||||||||
FE72 | OUT ($FE),A | |||||||||||||
FE74 | RET |
Prev: FE52 | Up: Map | Next: FE75 |