From: Pokemonhacker <pok...@us...> - 2005-06-25 06:14:17
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7685 Modified Files: bios.cpp Log Message: - Corrected a bug in RLUnCompVram/RLUnCompWram. Reading of the header is now correctly done when the header's address is not aligned (Mortal Kombat 2's fire animation now shows properly). - CPUSet/CPUFastset : Added emulation for bios reading from bios area (just in case some games would want to use it). Index: bios.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/bios.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** bios.cpp 7 Jun 2005 10:19:26 -0000 1.16 --- bios.cpp 25 Jun 2005 06:14:08 -0000 1.17 *************** *** 1,5 **** // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten ! // Copyright (C) 2004 Forgotten and the VBA development team // This program is free software; you can redistribute it and/or modify --- 1,5 ---- // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten ! // Copyright (C) 2005 Forgotten and the VBA development team // This program is free software; you can redistribute it and/or modify *************** *** 279,283 **** // fill ? if((cnt >> 24) & 1) { ! u32 value = CPUReadMemory(source); while(count) { CPUWriteMemory(dest, value); --- 279,283 ---- // fill ? if((cnt >> 24) & 1) { ! u32 value = (source>0x0EFFFFFF ? 0x1CAD1CAD : CPUReadMemory(source)); while(count) { CPUWriteMemory(dest, value); *************** *** 288,292 **** // copy while(count) { ! CPUWriteMemory(dest, CPUReadMemory(source)); source += 4; dest += 4; --- 288,292 ---- // copy while(count) { ! CPUWriteMemory(dest, (source>0x0EFFFFFF ? 0x1CAD1CAD : CPUReadMemory(source))); source += 4; dest += 4; *************** *** 297,301 **** // 16-bit fill? if((cnt >> 24) & 1) { ! u16 value = CPUReadHalfWord(source); while(count) { CPUWriteHalfWord(dest, value); --- 297,301 ---- // 16-bit fill? if((cnt >> 24) & 1) { ! u16 value = (source>0x0EFFFFFF ? 0x1CAD : CPUReadHalfWord(source)); while(count) { CPUWriteHalfWord(dest, value); *************** *** 306,310 **** // copy while(count) { ! CPUWriteHalfWord(dest, CPUReadHalfWord(source)); source += 2; dest += 2; --- 306,310 ---- // copy while(count) { ! CPUWriteHalfWord(dest, (source>0x0EFFFFFF ? 0x1CAD : CPUReadHalfWord(source))); source += 2; dest += 2; *************** *** 342,346 **** while(count > 0) { // BIOS always transfers 32 bytes at a time ! u32 value = CPUReadMemory(source); for(int i = 0; i < 8; i++) { CPUWriteMemory(dest, value); --- 342,346 ---- while(count > 0) { // BIOS always transfers 32 bytes at a time ! u32 value = (source>0x0EFFFFFF ? 0xBAFFFFFB : CPUReadMemory(source)); for(int i = 0; i < 8; i++) { CPUWriteMemory(dest, value); *************** *** 354,358 **** // BIOS always transfers 32 bytes at a time for(int i = 0; i < 8; i++) { ! CPUWriteMemory(dest, CPUReadMemory(source)); source += 4; dest += 4; --- 354,358 ---- // BIOS always transfers 32 bytes at a time for(int i = 0; i < 8; i++) { ! CPUWriteMemory(dest, (source>0x0EFFFFFF ? 0xBAFFFFFB :CPUReadMemory(source))); source += 4; dest += 4; *************** *** 964,968 **** u32 dest = reg[1].I; ! u32 header = CPUReadMemory(source); source += 4; --- 964,968 ---- u32 dest = reg[1].I; ! u32 header = CPUReadMemory(source & 0xFFFFFFFC); source += 4; *************** *** 1033,1037 **** u32 dest = reg[1].I; ! u32 header = CPUReadMemory(source); source += 4; --- 1033,1037 ---- u32 dest = reg[1].I; ! u32 header = CPUReadMemory(source & 0xFFFFFFFC); source += 4; |