![]() |
Routines |
| Prev: B94B | Up: Map | Next: B9BC |
|
Copy an 8-byte explosion template into Explosion_Slot, which starts a sound. The entry point at InitialiseExplosion_Copy takes the template address in HL.
There are five templates. The first is read by TickWaveDuration (type A5) and the other four by TickWaveTable (type A1).
|
||||
| InitialiseExplosion | B950 | LD HL,$B95C | HL=Explosion_Template_1. | |
| InitialiseExplosion_Copy | B953 | LD DE,$6060 | DE=Explosion_Slot. | |
| B956 | LD BC,$0008 | Copy 08 bytes from HL to DE. | ||
| B959 | LDIR | |||
| B95B | RET | Return. | ||
|
Template for TickWaveDuration. It plays one note on each pass, starting from the pitch below and counting down to 01 so the sound rises over 27 notes. Nothing calls InitialiseExplosion, so this one is never used. The copy at InitialiseExplosion_Copy takes four more bytes than this, which are the first instructions at Copy_Explosion_Template, but TickWaveDuration never reads them.
|
||||
| Explosion_Template_1 | B95C | DEFB $A5 | Actor type, handled by TickWaveDuration. | |
| B95D | DEFB $20 | Not read by TickWaveDuration. | ||
| B95E | DEFB $08 | Repeat count: each note is played 08 times. | ||
| B95F | DEFB $28 | Starting pitch. | ||
|
This entry point is used by the routines at Handler_PlayerShot and Handler_Missile_ConvertExploding.
|
||||
| Copy_Explosion_Template | B960 | LD HL,$B965 | HL=Explosion_Template_2. | |
| B963 | JR InitialiseExplosion_Copy | Jump to InitialiseExplosion_Copy. | ||
|
Template for TickWaveTable: seven notes of falling pitch, each played 08 times.
|
||||
| Explosion_Template_2 | B965 | DEFB $A1 | Actor type, handled by TickWaveTable. | |
| B966 | DEFB $08 | Counter: a value of 08 gives seven notes. | ||
| B967 | DEFW $B96A | Address of the pitch table minus one. | ||
| B969 | DEFB $08 | Repeat count: each note is played 08 times. | ||
| B96A | DEFB $00 | Index 00 of the pitch table, which is never read. | ||
| B96B | DEFB $78,$70,$68,$60,$58,$50,$48 | Pitch table, played from the last byte back to the first. | ||
| B972 | DEFB $40 | Never played, as the counter reaches zero first. | ||
| InitialiseExplosion_2 | B973 | LD HL,$B978 | HL=Explosion_Template_Burst. | |
| B976 | JR InitialiseExplosion_Copy | Jump to InitialiseExplosion_Copy. | ||
|
Template for TickWaveTable: seven notes of rising pitch, each played 10 times.
|
||||
| Explosion_Template_Burst | B978 | DEFB $A1 | Actor type, handled by TickWaveTable. | |
| B979 | DEFB $08 | Counter: a value of 08 gives seven notes. | ||
| B97A | DEFW $B97D | Address of the pitch table minus one. | ||
| B97C | DEFB $10 | Repeat count: each note is played 10 times. | ||
| B97D | DEFB $00 | Index 00 of the pitch table, which is never read. | ||
| B97E | DEFB $40,$48,$50,$58,$60,$60,$68 | Pitch table, played from the last byte back to the first. | ||
| B985 | DEFB $70 | Never played, as the counter reaches zero first. | ||
| InitialiseExplosion_3 | B986 | LD HL,$B98B | HL=Explosion_Template_3. | |
| B989 | JR InitialiseExplosion_Copy | Jump to InitialiseExplosion_Copy. | ||
|
Template for TickWaveTable: fifteen notes that swap between two pitches in runs of up to four, each note played 06 times.
|
||||
| Explosion_Template_3 | B98B | DEFB $A1 | Actor type, handled by TickWaveTable. | |
| B98C | DEFB $10 | Counter: a value of 10 gives fifteen notes. | ||
| B98D | DEFW $B990 | Address of the pitch table minus one. | ||
| B98F | DEFB $06 | Repeat count: each note is played 06 times. | ||
| B990 | DEFB $00 | Index 00 of the pitch table, which is never read. | ||
| B991 | DEFB $40,$40,$40,$40,$50,$50,$50,$50 | Pitch table, played from the last byte back to the first. | ||
| B999 | DEFB $40,$40,$40,$40,$50,$50,$50 | |||
| B9A0 | DEFB $50 | Never played, as the counter reaches zero first. | ||
| InitialiseExplosion_4 | B9A1 | LD HL,$B9A6 | HL=Explosion_Template_4. | |
| B9A4 | JR InitialiseExplosion_Copy | Jump to InitialiseExplosion_Copy. | ||
|
Template for TickWaveTable: fifteen notes of falling pitch, each played 06 times.
|
||||
| Explosion_Template_4 | B9A6 | DEFB $A1 | Actor type, handled by TickWaveTable. | |
| B9A7 | DEFB $10 | Counter: a value of 10 gives fifteen notes. | ||
| B9A8 | DEFW $B9AB | Address of the pitch table minus one. | ||
| B9AA | DEFB $06 | Repeat count: each note is played 06 times. | ||
| B9AB | DEFB $00 | Index 00 of the pitch table, which is never read. | ||
| B9AC | DEFB $50,$4E,$4C,$4A,$48,$46,$44,$42 | Pitch table, played from the last byte back to the first. | ||
| B9B4 | DEFB $40,$3E,$3C,$3A,$38,$36,$34 | |||
| B9BB | DEFB $32 | Never played, as the counter reaches zero first. | ||
| Prev: B94B | Up: Map | Next: B9BC |