From d9b22190a117ff859cef13084b82985ab677f1dd Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 10 Nov 2024 20:12:29 -0500 Subject: vt1682_alu.cpp: Copy multiply result to registers 4/5 --- src/mame/nintendo/vt1682_alu.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mame/nintendo/vt1682_alu.cpp b/src/mame/nintendo/vt1682_alu.cpp index eb83e1f9d83..e3cc4d60e8f 100644 --- a/src/mame/nintendo/vt1682_alu.cpp +++ b/src/mame/nintendo/vt1682_alu.cpp @@ -268,7 +268,9 @@ void vrt_vt1682_alu_device::alu_oprand_6_mult_w(uint8_t data) uint32_t result = param1 * param2; put_u32le(&m_alu_oprand[0], result); - // 4/5 untouched? or set to 0? + + // lxts3 (Sunnyside Race) reads result from 4/5 instead of 0/1 + put_u16le(&m_alu_oprand[4], result & 0xffff); } @@ -321,6 +323,6 @@ void vrt_vt1682_alu_device::alu_oprand_6_div_w(uint8_t data) uint16_t remainder = param1 - param2 * (quotient & ~uint32_t(1)); put_u32le(&m_alu_oprand[0], quotient); - put_u16le(&m_alu_oprand[4], (remainder >> 1) | ((remainder & 1) << 15)); + put_u16le(&m_alu_oprand[4], (remainder >> 1) | (remainder << 15)); } } -- cgit v1.2.3