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:
sinamas 2008-01-09 01:08:46 +00:00
parent 6eb9761b10
commit 42f490721f
5 changed files with 6 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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;
} }