Chase H.Q. | Routines |
Prev: F251 | Up: Map | Next: F29D |
|
||||
play_siren_sfx_128k | F269 | LD A,($A239) | Return if siren disabled | |
F26C | AND A | |||
F26D | RET Z | |||
F26E | LD A,($A213) | Load channel A fine pitch | ||
F271 | LD B,$AA | Load 50-50 alternating pattern (self modified above) | ||
F273 | RLC B | Jump to increasing case if top bit was set | ||
F275 | JR C,pss_increasing | |||
Decreasing case.
|
||||
pss_decreasing | F277 | SUB $03 | Decrease pitch by 3 | |
F279 | CP $5A | Jump to set regs if new pitch >= 90 | ||
F27B | JR NC,pss_set_regs | |||
F27D | JR pss_change | Otherwise went too far: jump to pss_change | ||
Increasing case.
|
||||
pss_increasing | F27F | ADD A,$03 | Increase pitch by 3 | |
F281 | CP $8C | Jump to set regs if new pitch < 140 | ||
F283 | JR C,pss_set_regs | |||
Arrive here if new pitch is outside of 90..139.
|
||||
pss_change | F285 | EX AF,AF' | Preserve new pitch | |
F286 | LD A,B | Store rotating pattern (self modifying above) | ||
F287 | LD ($8066),A | |||
F28A | EX AF,AF' | Restore new pitch | ||
Arrive here if new pitch is 90..139.
|
||||
pss_set_regs | F28B | LD ($A213),A | Update channel A fine pitch | |
F28E | SUB $04 | and store 4 less to channel B fine pitch | ||
F290 | LD ($A215),A | |||
F293 | LD A,($A21A) | Set mixer to enable tone A & B | ||
F296 | AND $3C | |||
F298 | LD ($A21A),A | |||
F29B | JR write_registers_128k | Exit via write_registers_128k |
Prev: F251 | Up: Map | Next: F29D |