From 48e3321261115847b8c7458fe53cf503015d78c4 Mon Sep 17 00:00:00 2001 From: ekeeke Date: Mon, 25 Nov 2019 17:17:26 +0100 Subject: [PATCH] [Core/CPU] fixed sub 68K DIVU instruction timings --- core/m68k/m68kops.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/core/m68k/m68kops.h b/core/m68k/m68kops.h index 564a57e..92c40c0 100644 --- a/core/m68k/m68kops.h +++ b/core/m68k/m68kops.h @@ -8117,7 +8117,7 @@ static void m68k_op_divu_16_d(void) *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16)); return; } - USE_CYCLES(7 * 10); + USE_CYCLES(MUL * 10); FLAG_V = VFLAG_SET; FLAG_N = NFLAG_SET; /* undocumented behavior (fixes Blood Shot on Genesis) */ FLAG_C = CFLAG_CLEAR; @@ -8148,7 +8148,7 @@ static void m68k_op_divu_16_ai(void) *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16)); return; } - USE_CYCLES(7 * 10); + USE_CYCLES(MUL * 10); FLAG_V = VFLAG_SET; FLAG_N = NFLAG_SET; /* undocumented behavior (fixes Blood Shot on Genesis) */ FLAG_C = CFLAG_CLEAR; @@ -8179,7 +8179,7 @@ static void m68k_op_divu_16_pi(void) *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16)); return; } - USE_CYCLES(7 *10); + USE_CYCLES(MUL * 10); FLAG_V = VFLAG_SET; FLAG_N = NFLAG_SET; /* undocumented behavior (fixes Blood Shot on Genesis) */ FLAG_C = CFLAG_CLEAR; @@ -8210,7 +8210,7 @@ static void m68k_op_divu_16_pd(void) *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16)); return; } - USE_CYCLES(7 * 10); + USE_CYCLES(MUL * 10); FLAG_V = VFLAG_SET; FLAG_N = NFLAG_SET; /* undocumented behavior (fixes Blood Shot on Genesis) */ FLAG_C = CFLAG_CLEAR; @@ -8241,7 +8241,7 @@ static void m68k_op_divu_16_di(void) *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16)); return; } - USE_CYCLES(7 * 10); + USE_CYCLES(MUL * 10); FLAG_V = VFLAG_SET; FLAG_N = NFLAG_SET; /* undocumented behavior (fixes Blood Shot on Genesis) */ FLAG_C = CFLAG_CLEAR; @@ -8272,7 +8272,7 @@ static void m68k_op_divu_16_ix(void) *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16)); return; } - USE_CYCLES(7 * 10); + USE_CYCLES(MUL * 10); FLAG_V = VFLAG_SET; FLAG_N = NFLAG_SET; /* undocumented behavior (fixes Blood Shot on Genesis) */ FLAG_C = CFLAG_CLEAR; @@ -8303,7 +8303,7 @@ static void m68k_op_divu_16_aw(void) *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16)); return; } - USE_CYCLES(7 * 10); + USE_CYCLES(MUL * 10); FLAG_V = VFLAG_SET; FLAG_N = NFLAG_SET; /* undocumented behavior (fixes Blood Shot on Genesis) */ FLAG_C = CFLAG_CLEAR; @@ -8334,7 +8334,7 @@ static void m68k_op_divu_16_al(void) *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16)); return; } - USE_CYCLES(7 * 10); + USE_CYCLES(MUL * 10); FLAG_V = VFLAG_SET; FLAG_N = NFLAG_SET; /* undocumented behavior (fixes Blood Shot on Genesis) */ FLAG_C = CFLAG_CLEAR; @@ -8365,7 +8365,7 @@ static void m68k_op_divu_16_pcdi(void) *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16)); return; } - USE_CYCLES(7 * 10); + USE_CYCLES(MUL * 10); FLAG_V = VFLAG_SET; FLAG_N = NFLAG_SET; /* undocumented behavior (fixes Blood Shot on Genesis) */ FLAG_C = CFLAG_CLEAR; @@ -8396,7 +8396,7 @@ static void m68k_op_divu_16_pcix(void) *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16)); return; } - USE_CYCLES(7 * 10); + USE_CYCLES(MUL * 10); FLAG_V = VFLAG_SET; FLAG_N = NFLAG_SET; /* undocumented behavior (fixes Blood Shot on Genesis) */ FLAG_C = CFLAG_CLEAR; @@ -8427,7 +8427,7 @@ static void m68k_op_divu_16_i(void) *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16)); return; } - USE_CYCLES(7 * 10); + USE_CYCLES(MUL * 10); FLAG_V = VFLAG_SET; FLAG_N = NFLAG_SET; /* undocumented behavior (fixes Blood Shot on Genesis) */ FLAG_C = CFLAG_CLEAR;