Hello people,
while coding the brilliant Sundance demo, I found a problem running this demo on a real CPC 6128.
In every emulator I tested it, it ran fine. On the real CPC it crashed.
So I checked again my equalizer code, which reads the PSG values.
The solution: Bit 6 @ PPI control port seems to cause a reset (or similar?)
Thanks to cngsoft for your help!
Just want to show you the difference in the code:
Bad code (Works fine on emulator but lets the real CPC crash)
.read_from_psg
ld b,#f4
out (c),e
ld bc,#f6c0
out (c),c
xor a
out (c),a
ld bc,#f7d2
out (c),c
ld bc,#f640
out (c),c
ld b,#f4
in a,(c)
ld bc,#f7c2
out (c),c
ld bc,#f600
out (c),c
ret
The good code:
.read_from_psg
ld b,#f4
out (c),e
ld bc,#f6c0
out (c),c
xor a
out (c),a
ld bc,#f792
out (c),c
ld bc,#f640
out (c),c
ld b,#f4
in a,(c)
ld bc,#f782
out (c),c
ld bc,#f600
out (c),c
ret