![]() |
Routines |
| Prev: A082 | Up: Map | Next: A09D |
|
Used by the routine at Handle_Sabreman_Walking.
Plays a short tone on one call in every four. Each call adds one to the sound counter (see Sound_Counter) and it returns at once unless the two low bits of the counter are zero. When it does play, it uses a half period of 40 if bit 2 of the counter is set and 60 if it is clear, and plays four cycles.
|
||||
| Play_Alternating_Tone | A087 | LD HL,$8EF6 | Point at the sound counter (Sound_Counter). | |
| A08A | INC (HL) | Add one to the counter. | ||
| A08B | LD A,(HL) | Fetch the counter. | ||
| A08C | AND %00000011 | Keep only the two low bits of the sound counter. | ||
| A08E | RET NZ | Return unless the sound counter is a multiple of four. | ||
| A08F | BIT 2,(HL) | Jump to Play_Alternating_Tone_Lower if bit 2 of the counter is clear. | ||
| A091 | JR Z,Play_Alternating_Tone_Lower | |||
| A093 | LD BC,$4004 | BC=4004 (half period 40 four cycles). | ||
| A096 | JR SoundsBeep | Jump to SoundsBeep to play the tone. | ||
| Play_Alternating_Tone_Lower | A098 | LD BC,$6004 | BC=6004 (half period 60 four cycles). | |
| A09B | JR SoundsBeep | Jump to SoundsBeep to play the tone. | ||
| Prev: A082 | Up: Map | Next: A09D |