From: <mta...@us...> - 2008-11-18 09:24:29
|
Revision: 1136 http://desmume.svn.sourceforge.net/desmume/?rev=1136&view=rev Author: mtabachenko Date: 2008-11-18 09:24:23 +0000 (Tue, 18 Nov 2008) Log Message: ----------- core: - fix textures (ex. Castlevania DOS) Modified Paths: -------------- trunk/desmume/src/MMU.cpp Modified: trunk/desmume/src/MMU.cpp =================================================================== --- trunk/desmume/src/MMU.cpp 2008-11-17 21:04:12 UTC (rev 1135) +++ trunk/desmume/src/MMU.cpp 2008-11-18 09:24:23 UTC (rev 1136) @@ -1183,6 +1183,24 @@ case REG_VRAMCNTD: if(proc == ARMCPU_ARM9) { + // + // FIXME: simply texture slot handling + // This is a first stab and is not correct. It does + // not handle a VRAM texture slot becoming + // unconfigured. + // Revisit all of VRAM control handling for future + // release? + // + if ( val & 0x80) { + if ( (val & 0x7) == 3) { + int slot_index = (val >> 3) & 0x3; + + ARM9Mem.textureSlotAddr[slot_index] = + &ARM9Mem.ARM9_LCD[0x20000 * (adr - REG_VRAMCNTA)]; + + gpu3D->NDS_3D_VramReconfigureSignal(); + } + } if (MMU_checkVRAM(adr-REG_VRAMCNTA, val) == 1) break; MMU_VRAMWriteBackToLCD(adr-REG_VRAMCNTA) ; @@ -1212,24 +1230,6 @@ MMU.vram_mode[adr-REG_VRAMCNTA] = 4 | (adr-REG_VRAMCNTA) ; break ; } - // - // FIXME: simply texture slot handling - // This is a first stab and is not correct. It does - // not handle a VRAM texture slot becoming - // unconfigured. - // Revisit all of VRAM control handling for future - // release? - // - if ( val & 0x80) { - if ( (val & 0x7) == 3) { - int slot_index = (val >> 3) & 0x3; - - ARM9Mem.textureSlotAddr[slot_index] = - &ARM9Mem.ARM9_LCD[0x20000 * (adr - REG_VRAMCNTA)]; - - gpu3D->NDS_3D_VramReconfigureSignal(); - } - } MMU_VRAMReloadFromLCD(adr-REG_VRAMCNTA,val) ; } break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |