F0C6: White noise generator?
noise |
F0C6 |
LD E,A |
noise_outer_loop |
F0C7 |
LD D,$32 |
noise_loop |
F0C9 |
LD HL,$9618 |
|
F0CC |
INC (HL) |
|
F0CD |
INC (HL) |
|
F0CE |
INC (HL) |
|
F0CF |
LD B,(HL) |
|
F0D0 |
INC HL |
|
F0D1 |
LD A,(HL) |
|
F0D2 |
SUB $8D |
|
F0D4 |
LD (HL),A |
|
F0D5 |
ADD A,B |
|
F0D6 |
INC HL |
|
F0D7 |
RLCA |
|
F0D8 |
RRC (HL) |
|
F0DA |
ADD A,(HL) |
|
F0DB |
LD (HL),A |
|
F0DC |
AND $10 |
|
F0DE |
JR Z,noise_2 |
|
F0E0 |
LD A,$18 |
|
F0E2 |
SUB E |
|
F0E3 |
LD B,A |
noise_0 |
F0E4 |
DJNZ noise_0 |
|
F0E6 |
LD A,$18 |
|
F0E8 |
OUT ($FE),A |
|
F0EA |
LD B,E |
noise_1 |
F0EB |
DJNZ noise_1 |
|
F0ED |
XOR A |
|
F0EE |
OUT ($FE),A |
noise_2 |
F0F0 |
DEC D |
|
F0F1 |
JR NZ,noise_loop |
|
F0F3 |
LD A,($EF14) |
|
F0F6 |
AND A |
|
F0F7 |
RET C |
|
F0F8 |
DEC E |
|
F0F9 |
JR NZ,noise_outer_loop |
|
F0FB |
JP dk_wait |