Prev: 9D91 Up: Map Next: 9DB9
9DA7: Sound FX command 3
Noise.
Input
B Channel index + 1
IX Sound fx data
sound_fx_command_3 9DA7 LD A,(IX+$04) Get attenuation/noise control (starts with $00)
9DAA INC A Increment
9DAB LD C,A And save
9DAC AND $0F Test if bits 0-3 were 0
9DAE LD A,C Restore incremented value
9DAF JR NZ,sound_fx_command_3_0 If bits weren't 0 then skip next
9DB1 ADD A,$10 Add 1 to attenuation
9DB3 JR Z,current_sound_fx_done If it rolled over then sound FX done
sound_fx_command_3_0 9DB5 LD (IX+$04),A Save again
9DB8 RET
Prev: 9D91 Up: Map Next: 9DB9