![]() |
Routines |
| Prev: BF2A | Up: Map | Next: BF3D |
|
Used by the routine at LandSabreman.
Plays 30 tones, each with a pitch worked out from the counter, which gives a noisy sound.
|
||||
| PlayNoiseSound | BF2F | LD C,$30 | Set the number of tones in C to 30. | |
| PlayNoiseSound_Loop | BF31 | LD A,C | Fetch the tone counter. | |
| BF32 | XOR %01010101 | Flip bits 0, 2, 4 and 6. | ||
| BF34 | ADD A,C | Add the tone counter. | ||
| BF35 | LD B,A | Store the result in B (the half-period). | ||
| BF36 | CALL PlaySquareWave | Play the tone. | ||
| BF39 | DEC C | Decrease the tone counter by one and loop back to PlayNoiseSound_Loop until all of the tones have been played. | ||
| BF3A | JR NZ,PlayNoiseSound_Loop | |||
| BF3C | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: BF2A | Up: Map | Next: BF3D |