diff --git a/Assets/dll/virtualjaguar.wbx.zst b/Assets/dll/virtualjaguar.wbx.zst index 8a1c2a50b3..e19b0b4f61 100644 Binary files a/Assets/dll/virtualjaguar.wbx.zst and b/Assets/dll/virtualjaguar.wbx.zst differ diff --git a/waterbox/virtualjaguar/src/risc_opcodes.h b/waterbox/virtualjaguar/src/risc_opcodes.h index 3eae1ec2c6..706d863867 100644 --- a/waterbox/virtualjaguar/src/risc_opcodes.h +++ b/waterbox/virtualjaguar/src/risc_opcodes.h @@ -333,8 +333,6 @@ RISC_OPCODE(moveq) RISC_OPCODE(resmac) { RN = (uint32_t)risc_acc; - //this makes Club Drive sound ok, but it has missing sounds and other games/bios suffer - //risc_inhibit_interrupt = 1; } RISC_OPCODE(imult) diff --git a/waterbox/virtualjaguar/src/tom.cpp b/waterbox/virtualjaguar/src/tom.cpp index 8e2998522d..3791dcc964 100644 --- a/waterbox/virtualjaguar/src/tom.cpp +++ b/waterbox/virtualjaguar/src/tom.cpp @@ -561,6 +561,8 @@ void TOMWriteByte(uint32_t offset, uint8_t data, uint32_t who) if ((offset < 0xF00000) || (offset > 0xF03FFF)) return; + tomRam8[offset & 0x3FFF] = data; + if ((offset >= GPU_CONTROL_RAM_BASE) && (offset < GPU_CONTROL_RAM_BASE+0x20)) { GPUWriteByte(offset, data, who); @@ -599,10 +601,6 @@ void TOMWriteByte(uint32_t offset, uint8_t data, uint32_t who) offset &= 0x5FF; tomRam8[offset] = data, tomRam8[offset + 0x200] = data; } - else - { - tomRam8[offset & 0x3FFF] = data; - } } // @@ -616,6 +614,9 @@ void TOMWriteWord(uint32_t offset, uint16_t data, uint32_t who) if ((offset < 0xF00000) || (offset > 0xF03FFF)) return; + tomRam8[(offset + 0) & 0x3FFF] = data >> 8; + tomRam8[(offset + 1) & 0x3FFF] = data & 0xFF; + if ((offset >= GPU_CONTROL_RAM_BASE) && (offset < GPU_CONTROL_RAM_BASE+0x20)) { GPUWriteWord(offset, data, who); @@ -679,9 +680,6 @@ void TOMWriteWord(uint32_t offset, uint16_t data, uint32_t who) tomWidth = width, tomHeight = height; } } - - tomRam8[(offset + 0) & 0x3FFF] = data >> 8; - tomRam8[(offset + 1) & 0x3FFF] = data & 0xFF; } int TOMIRQEnabled(int irq)