Prev: 9D3D Up: Map Next: 9D91
9D67: Execute commands for all sound fx channels
Used by the routine at sound_player.
execute_sound_fx_commands 9D67 LD IX,sound_fx_data_buffer_4 Sound fx data 4 (start at the end)
9D6B LD B,$04 4 channels
This entry point is used by the routine at execute_sound_fx_commands_1.
execute_sound_fx_commands_0 9D6D LD A,(IX+$05) Get index of sound command to call
9D70 AND A Test bits and clear carry
9D71 JP P,execute_sound_fx_commands_1 Skip channel if bit 7 is reset
9D74 RLA Multiply by 2, and shift out bit 7
9D75 LD E,A DE = A
9D76 LD D,$00 ...
9D78 LD IY,sound_fx_command_jump_table Base address of jump table
9D7C ADD IY,DE Add offset
9D7E LD L,(IY+$00) Get LSB
9D81 LD H,(IY+$01) Get MSB
9D84 LD DE,execute_sound_fx_commands_1 Return address
9D87 PUSH DE Push return address on stack
9D88 JP (HL) Jump to sound command
execute_sound_fx_commands_1 9D89 LD DE,$FFF8 -8
9D8C ADD IX,DE Move 8 bytes back
9D8E DJNZ execute_sound_fx_commands_0 Loop for 4 channels
sound_fx_command_10 9D90 RET
Prev: 9D3D Up: Map Next: 9D91