| Chase H.Q. | Routines |
| Prev: F2F1 | Up: Map | Next: F32E |
|
Lives at $80EE when relocated.
Called once a frame. When turbo_sfx_noise_pitch is zero the turbo is not sounding and control passes straight to engine_sfx_from_speed_128k; when it is 1 the routine returns without touching the AY. Otherwise the noise pitch soft copy at $A219 is decremented in place and echoed, plus 10, into the channel C pitch, with tone and noise C enabled at volume 13 -- a burst that descends in pitch as the counter falls. When it reaches zero pts_stop disables tone and noise C, clears turbo_sfx_noise_pitch and leaves through engine_sfx_from_speed_128k so that the engine takes the channel back.
|
||||
| play_engine_or_turbo_sfx_128k | F2FA | LD A,($A23A) | Jump to engine_sfx_from_speed_128k if turbo_sfx_noise_pitch is zero | |
| F2FD | AND A | |||
| F2FE | JR Z,engine_sfx_from_speed_128k | |||
| F300 | DEC A | Decrement noise pitch | ||
| F301 | RET Z | Return if zero | ||
| F302 | LD HL,$A219 | Load address of AY noise pitch register soft copy | ||
| F305 | DEC (HL) | Decrement in-place | ||
| F306 | JR Z,pts_stop | Jump to pts_stop if zero | ||
| F308 | LD A,(HL) | Load noise pitch register soft copy | ||
| F309 | ADD A,$0A | Increment by 10 | ||
| F30B | LD L,A | Widen result to HL | ||
| F30C | LD H,$00 | |||
| F30E | LD ($A217),HL | Set Channel C pitch (both fine and coarse) | ||
| F311 | LD A,($A21A) | Set mixer to enable Tone C and Noise C | ||
| F314 | AND $1B | |||
| F316 | LD ($A21A),A | |||
| F319 | LD A,$0D | Set Channel C volume to 13 | ||
| F31B | LD ($A21D),A | |||
| F31E | RET | Return | ||
| pts_stop | F31F | LD A,($A21A) | Set mixer to disable Tone C and Noise C | |
| F322 | OR $24 | |||
| F324 | LD ($A21A),A | |||
| F327 | XOR A | Clear turbo_sfx_noise_pitch | ||
| F328 | LD ($A23A),A | |||
| F32B | JP $80AA | Exit via engine_sfx_from_speed_128k | ||
| Prev: F2F1 | Up: Map | Next: F32E |