| Prev: 6BDB | Up: Map | Next: 6C24 |
6BED: Process control state flags and trigger sound effects
|
Sound processing dispatcher called from interrupt handler. Reads state_controls control flags and calls appropriate sound routines. Multiple sounds can trigger simultaneously (e.g., fire + low fuel).
|
||||||||||||||||||||||||||||
|
Flags are set by game logic (input handlers, collision, fuel system) and cleared by sound routines when complete.
|
||||||||||||||||||||||||||||
| handle_controls | 6BED | LD A,($5C08) | Skip if LAST_K is 'h'. | |||||||||||||||||||||||||
| 6BF0 | CP $68 | |||||||||||||||||||||||||||
| 6BF2 | JP Z,int_return | |||||||||||||||||||||||||||
| 6BF5 | LD HL,$6BB0 | Check FIRE_SOUND → do_fire. | ||||||||||||||||||||||||||
| 6BF8 | BIT 0,(HL) | |||||||||||||||||||||||||||
| 6BFA | CALL NZ,do_fire | |||||||||||||||||||||||||||
| 6BFD | BIT 4,(HL) | Check BONUS_LIFE → do_bonus_life. | ||||||||||||||||||||||||||
| 6BFF | CALL NZ,do_bonus_life | |||||||||||||||||||||||||||
| 6C02 | LD HL,$6BB0 | |||||||||||||||||||||||||||
| 6C05 | BIT 5,(HL) | Check EXPLODING → beep_explosion. | ||||||||||||||||||||||||||
| 6C07 | CALL NZ,beep_explosion | |||||||||||||||||||||||||||
| 6C0A | LD HL,$6BB0 | |||||||||||||||||||||||||||
| 6C0D | BIT 3,(HL) | Check LOW_FUEL → do_low_fuel. | ||||||||||||||||||||||||||
| 6C0F | JP NZ,do_low_fuel | |||||||||||||||||||||||||||
| 6C12 | LD A,(HL) | |||||||||||||||||||||||||||
| 6C13 | AND $06 | Mask speed bits. | ||||||||||||||||||||||||||
| 6C15 | CP $02 | Normal speed → beep_engine_normal. | ||||||||||||||||||||||||||
| 6C17 | JP Z,beep_engine_normal | |||||||||||||||||||||||||||
| 6C1A | CP $04 | Fast speed → beep_engine_fast. | ||||||||||||||||||||||||||
| 6C1C | JP Z,beep_engine_fast | |||||||||||||||||||||||||||
| 6C1F | CP $06 | Slow speed → beep_engine_slow. | ||||||||||||||||||||||||||
| 6C21 | JP Z,beep_engine_slow | |||||||||||||||||||||||||||
| Prev: 6BDB | Up: Map | Next: 6C24 |