![]() |
Routines |
A | Contents of delay counter at 32757 |
65111 | CP 39 | Return unless ERIC has just been knocked out |
65113 | RET NZ | |
65114 | LD HL,275 | A=2 (initial border colour: red), H=1 (pitch adjustment), L=19 (border alternates red/blue), D=0 (duration), E=0 (initial pitch) |
65117 | LD DE,0 | |
65120 | LD A,2 |
A | Initial border colour | D | Duration | E | Initial pitch | H | Pitch adjustment | L | 16 + border XOR value |
65122 | XOR L | Flip the border colour and the state of the speaker |
65123 | OUT (254),A | |
65125 | LD B,E | Pitch delay |
65126 | DJNZ 65126 | |
65128 | LD B,A | Save A temporarily |
65129 | LD A,E | Adjust the pitch |
65130 | ADD A,H | |
65131 | LD E,A | |
65132 | LD A,B | Restore A |
65133 | DEC D | Decrement the duration counter |
65134 | JR NZ,65122 | Jump back unless the sound effect is finished |
65136 | LD A,1 | Make the border blue before returning |
65138 | OUT (254),A | |
65140 | RET |