summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author JOTEGO <jose.tejada@jotego.es>2026-03-14 22:00:01 +0100
committer GitHub <noreply@github.com>2026-03-14 23:00:01 +0200
commit44502a227292917da690af6fc9049c26cf920e17 (patch)
tree70e8e2ed43b044d5a1db0d8751f258f80e3589d8 /src
parentf808f9a7f8fa1d13ad9f7aa372d89d33bd57ff50 (diff)
fix(sh7604): fix three register access bugs (#15101)
- vcrd_w: read m_vcrd instead of m_vcrc for FOV interrupt vector - dmaor_w: use (old & data & 6) so AE/NMIF flags can actually be cleared - vcrb_r: mask reserved bits 15 and 7 with 0x7f7f, matching vcra/vcrc/vcrwdt Co-authored-by: Jose Tejada <jose.tejada@analog.com>
Diffstat (limited to 'src')
-rw-r--r--src/devices/cpu/sh/sh7604.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/cpu/sh/sh7604.cpp b/src/devices/cpu/sh/sh7604.cpp
index 7841c578c07..e3e17470ebf 100644
--- a/src/devices/cpu/sh/sh7604.cpp
+++ b/src/devices/cpu/sh/sh7604.cpp
@@ -1036,7 +1036,7 @@ void sh7604_device::vcra_w(offs_t offset, uint16_t data, uint16_t mem_mask)
uint16_t sh7604_device::vcrb_r()
{
- return m_vcrb;
+ return m_vcrb & 0x7f7f;
}
void sh7604_device::vcrb_w(offs_t offset, uint16_t data, uint16_t mem_mask)
@@ -1067,7 +1067,7 @@ uint16_t sh7604_device::vcrd_r()
void sh7604_device::vcrd_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_vcrd);
- m_irq_vector.fov = (m_vcrc >> 8) & 0x7f;
+ m_irq_vector.fov = (m_vcrd >> 8) & 0x7f;
sh2_recalc_irq();
}
@@ -1629,7 +1629,7 @@ void sh7604_device::dmaor_w(offs_t offset, uint32_t data, uint32_t mem_mask)
if (ACCESSING_BITS_0_7)
{
uint8_t old = m_dmaor & 0xf;
- m_dmaor = (data & ~6) | (old & m_dmaor & 6); // TODO: should this be old & data & 6? bug?
+ m_dmaor = (data & ~6) | (old & data & 6);
sh2_dmac_check(0);
sh2_dmac_check(1);
}