From b5fafba307ba7acc2aea90681c71a3d43aa9cac3 Mon Sep 17 00:00:00 2001 From: hap Date: Mon, 17 Mar 2025 15:41:21 +0100 Subject: [PATCH] v60: improve CVTSW flags and fix issue with float-to-u32 cast --- src/devices/cpu/v60/op2.hxx | 7 +++---- src/devices/cpu/v60/v60.h | 1 - src/mame/jaleco/ms32.cpp | 2 +- src/mame/seta/ssv.cpp | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/devices/cpu/v60/op2.hxx b/src/devices/cpu/v60/op2.hxx index c4abd0af06b..9e5292d3f9b 100644 --- a/src/devices/cpu/v60/op2.hxx +++ b/src/devices/cpu/v60/op2.hxx @@ -71,12 +71,11 @@ uint32_t v60_device::opCVTSW() // Convert to uint32_t val = u2f(m_op1); - m_modwritevalw = (uint32_t)val; + m_modwritevalw = (uint32_t)(int64_t)val; - _OV = 0; - _CY =(val < 0.0f); _S = ((m_modwritevalw & 0x80000000) != 0); - _Z = (val == 0.0f); + _OV = (_S && val >= 0.0f) || (!_S && val <= -1.0f); + _Z = (m_modwritevalw == 0); F2WriteSecondOperand(2); F2END(); diff --git a/src/devices/cpu/v60/v60.h b/src/devices/cpu/v60/v60.h index 9e28eff0bbd..0f79535a39c 100644 --- a/src/devices/cpu/v60/v60.h +++ b/src/devices/cpu/v60/v60.h @@ -776,7 +776,6 @@ private: [[noreturn]] uint32_t opUNHANDLED(); void v60_do_irq(int vector); void v60_try_irq(); - }; diff --git a/src/mame/jaleco/ms32.cpp b/src/mame/jaleco/ms32.cpp index 559412056a1..c6d91b712c8 100644 --- a/src/mame/jaleco/ms32.cpp +++ b/src/mame/jaleco/ms32.cpp @@ -2703,4 +2703,4 @@ GAME( 1997, bnstars, bnstars1, ms32, suchie2, ms32_state, GAME( 1996, wpksocv2, 0, ms32_invert_lines, wpksocv2, ms32_state, init_ss92046_01, ROT0, "Jaleco", "World PK Soccer V2 (ver 1.1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) /* these boot and show something */ -GAMEL( 1994, f1superb, 0, f1superb, f1superb, ms32_f1superbattle_state, init_f1superb, ROT0, "Jaleco", "F-1 Super Battle", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NODEVICE_LAN | MACHINE_SUPPORTS_SAVE, layout_f1superb ) +GAMEL(1994, f1superb, 0, f1superb, f1superb, ms32_f1superbattle_state, init_f1superb, ROT0, "Jaleco", "F-1 Super Battle", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NODEVICE_LAN | MACHINE_SUPPORTS_SAVE, layout_f1superb ) diff --git a/src/mame/seta/ssv.cpp b/src/mame/seta/ssv.cpp index a60a44c24f2..f660ffb3058 100644 --- a/src/mame/seta/ssv.cpp +++ b/src/mame/seta/ssv.cpp @@ -4681,7 +4681,7 @@ ROM_END ***************************************************************************/ -// year rom clone machine inputs init monitor manufacturer title flags +// year rom clone machine inputs init monitor manufacturer title flags GAME( 1993, dynagear, 0, dynagear, dynagear, ssv_state, init_ssv, ROT0, "Sammy", "Dyna Gear", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )