diff options
author | Aaron Giles <aaron@aarongiles.com> | 2021-07-15 10:15:30 -0700 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2021-07-15 10:15:30 -0700 |
commit | 3e4d3c7997bc5522083b6de6a23121cbd894469e (patch) | |
tree | ba48881a21d3704084e4f0009a72d5a8a7f41903 | |
parent | f936d35b586b78da5fdebdca4eeb1479c8f1c741 (diff) |
voodoo: Return 0 on invalid reads, seems to fix funkball. Improve logging of unexpected accesses to include register name.
-rw-r--r-- | src/devices/video/voodoo.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/devices/video/voodoo.cpp b/src/devices/video/voodoo.cpp index 6a7b2ec9736..89da0f1b08c 100644 --- a/src/devices/video/voodoo.cpp +++ b/src/devices/video/voodoo.cpp @@ -1947,7 +1947,10 @@ void voodoo_1_device::internal_texture_w(offs_t offset, u32 data) u32 voodoo_1_device::reg_invalid_r(u32 chipmask, u32 regnum) { - return 0xffffffff; + // funkball does invalid reads of textureMode and will leave + // improper bits set if this returns 0xffffffff + logerror("%s: Unexpected read from register %s[%X.%02X]\n", machine().describe_context(), m_regtable[regnum].name(), chipmask, regnum); + return 0x00000000; } @@ -2045,7 +2048,7 @@ u32 voodoo_1_device::reg_stats_r(u32 chipmask, u32 regnum) u32 voodoo_1_device::reg_invalid_w(u32 chipmask, u32 regnum, u32 data) { - logerror("%s: Unexpected write to register %02X[%X] = %08X\n", machine().describe_context(), regnum, chipmask, data); + logerror("%s: Unexpected write to register %s[%X.%02X] = %08X\n", machine().describe_context(), m_regtable[regnum].name(), chipmask, regnum, data); return 0; } @@ -2056,7 +2059,7 @@ u32 voodoo_1_device::reg_invalid_w(u32 chipmask, u32 regnum, u32 data) u32 voodoo_1_device::reg_unimplemented_w(u32 chipmask, u32 regnum, u32 data) { - logerror("%s: Unimplemented write to register %02X(%X) = %08X\n", machine().describe_context(), regnum, chipmask, data); + logerror("%s: Unimplemented write to register %s[%X.%02X] = %08X\n", machine().describe_context(), m_regtable[regnum].name(), chipmask, regnum, data); return 0; } |