![]() |
Routines |
| Prev: C062 | Up: Map | Next: C08D |
|
Used by the routine at PrintMessage.
Makes a burst of noise, made of four short tones with pitches that come from bytes of the ROM picked at random.
|
||||
| MakeExplosionSound | C072 | LD A,R | Pick a random page of the ROM... | |
| C074 | AND $1F | |||
| C076 | LD H,A | |||
| C077 | LD A,($9617) | ...and a random place in it. | ||
| C07A | LD L,A | |||
| C07B | LD E,$04 | There are four tones. | ||
| MakeExplosionSound_Loop | C07D | LD A,(HL) | Fetch a byte of the ROM, and move on to the next one. | |
| C07E | INC HL | |||
| C07F | AND $7F | Keep the lower seven bits of it. | ||
| C081 | OR $8F | Make sure that the pitch is at least 8F. | ||
| C083 | LD B,A | Use it as the pitch. | ||
| C084 | LD C,$01 | Each tone is made of one cycle. | ||
| C086 | CALL PlayWaveSequence | Make the tone using PlayWaveSequence. | ||
| C089 | DEC E | Loop back until all four tones have been made. | ||
| C08A | JR NZ,MakeExplosionSound_Loop | |||
| C08C | RET | Return. | ||
| Prev: C062 | Up: Map | Next: C08D |