| ← B8EC | Map | B953 → |
B915: Sound effect: bat grows
|
The expanded bat grows downward. The table gives each step of the sweep its pitch period.
|
||||
| bat_grows_pitches | B915 | DEFB $64,$5F | Never read | |
| B917 | DEFB $5A,$55,$50,$4B,$46,$41,$3C,$37 | The played periods, one per step of the sweep. QUIRK: one step near the end breaks the even downward run, so the pitch steps back. | ||
| B91F | DEFB $32,$2D,$28,$23,$1E,$3C,$14 | |||
| B926 | DEFB $C8,$14,$0A,$0B | Never read | ||
|
|
||||
| sfx_bat_grows | B92A | LD A,(sfx_grow) | Read the step counter; a disarmed effect has nothing to play. | |
| B92D | OR A | |||
| B92E | RET Z | |||
| B92F | CP $10 | The counter past its last step: clear it and return. That disarms the effect. | ||
| B931 | JR NZ,bat_grows_step | |||
| B933 | XOR A | |||
| B934 | LD (sfx_grow),A | |||
| B937 | RET | |||
| bat_grows_step | B938 | INC A | Advance to the next step and save the counter. | |
| B939 | LD (sfx_grow),A | |||
| B93C | PUSH HL | Preserve HL, DE and BC across the burst. | ||
| B93D | PUSH DE | |||
| B93E | PUSH BC | |||
| B93F | LD E,A | Index the pitch table by the new counter value; D takes this step's period byte. | ||
| B940 | LD D,$00 | |||
| B942 | LD HL,bat_grows_pitches | |||
| B945 | ADD HL,DE | |||
| B946 | LD D,(HL) | |||
| B947 | LD C,$02 | Play this step's burst at its one fixed period. | ||
| bat_grows_emit | B949 | CALL sound_blip | ||
| B94C | DEC C | |||
| B94D | JR NZ,bat_grows_emit | |||
| B94F | POP BC | Restore HL, DE and BC and return. | ||
| B950 | POP DE | |||
| B951 | POP HL | |||
| B952 | RET | |||
| ← B8EC | Map | B953 → |
