| ← B953 | Map | B9B4 → |
B991: Sound effect: safety net flash
|
The safety net prize's flash, played as the net brightens and again before it dims.
|
||||
|
|
||||
| sfx_net_flash | B991 | LD A,(sfx_net) | Read the step counter; a disarmed effect has nothing to play. | |
| B994 | OR A | |||
| B995 | RET Z | |||
| B996 | CP $08 | Once the sweep is over: clear the counter and stay silent this frame. | ||
| B998 | JR NZ,sfx_net_flash_step | |||
| B99A | XOR A | |||
| B99B | LD (sfx_net),A | |||
| B99E | RET | |||
| sfx_net_flash_step | B99F | INC A | Advance to the next step and store the counter; the sweep runs over seven frames. | |
| B9A0 | LD (sfx_net),A | |||
| B9A3 | PUSH DE | Preserve DE and BC for the caller. | ||
| B9A4 | PUSH BC | |||
| B9A5 | ADD A,A | The pitch falls a step on each frame of the flash. | ||
| B9A6 | ADD A,$0A | |||
| B9A8 | LD D,A | |||
| B9A9 | LD C,$0C | The frame's burst holds one pitch – no intra-frame sweep. | ||
| sfx_net_flash_cycle | B9AB | CALL sound_blip | Emit one cycle at the current period, then loop. | |
| B9AE | DEC C | |||
| B9AF | JR NZ,sfx_net_flash_cycle | |||
| B9B1 | POP BC | |||
| B9B2 | POP DE | |||
| B9B3 | RET | |||
| ← B953 | Map | B9B4 → |
