cgb dma from various areas results in 0xFF being written.
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@114 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
This commit is contained in:
parent
6eb9761b10
commit
42f490721f
BIN
hwtests/dma/dma_hiram_read_out7.gbc
Normal file
BIN
hwtests/dma/dma_hiram_read_out7.gbc
Normal file
Binary file not shown.
BIN
hwtests/dma/dma_hiram_read_result_out1.gbc
Normal file
BIN
hwtests/dma/dma_hiram_read_result_out1.gbc
Normal file
Binary file not shown.
BIN
hwtests/dma/dma_oam_read_out7.gbc
Normal file
BIN
hwtests/dma/dma_oam_read_out7.gbc
Normal file
Binary file not shown.
BIN
hwtests/dma/dma_vram_read_out7.gbc
Normal file
BIN
hwtests/dma/dma_vram_read_out7.gbc
Normal file
Binary file not shown.
@ -354,7 +354,12 @@ unsigned long Memory::event(unsigned long cycleCounter) {
|
|||||||
cycleCounter += 4;
|
cycleCounter += 4;
|
||||||
|
|
||||||
while (length--) {
|
while (length--) {
|
||||||
write(0x8000 | dmaDest++ & 0x1FFF, read(dmaSrc++ & 0xFFFF, cycleCounter), cycleCounter);
|
const unsigned src = dmaSrc++ & 0xFFFF;
|
||||||
|
|
||||||
|
write(0x8000 | dmaDest++ & 0x1FFF,
|
||||||
|
((src & 0xE000) == 0x8000 || src > 0xFDFF) ? 0xFF : read(src, cycleCounter),
|
||||||
|
cycleCounter);
|
||||||
|
|
||||||
cycleCounter += 2 << doubleSpeed;
|
cycleCounter += 2 << doubleSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user