From b23ed9629e3b64995475fde1e8d6c4ce5083af48 Mon Sep 17 00:00:00 2001 From: calamari Date: Sat, 24 Sep 2022 19:48:07 -0700 Subject: [PATCH] Add HWCALC entry for fx-9860G Slim --- include/gint/hardware.h | 2 ++ src/kernel/hardware.c | 3 ++- src/kernel/inth.S | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/gint/hardware.h b/include/gint/hardware.h index 8e86b80..6955e4d 100644 --- a/include/gint/hardware.h +++ b/include/gint/hardware.h @@ -105,6 +105,8 @@ void hw_detect(void); #define HWCALC_FXCG50 5 /* fx-CG 50 emulator, hardcoded in kernel/inth.S */ #define HWCALC_FXCG_MANAGER 6 +/* fx-9860G Slim, SH-3-based fx-9860G with hardware differences */ +#define HWCALC_FX9860G_SLIM 7 /* ** Keyboard diff --git a/src/kernel/hardware.c b/src/kernel/hardware.c index 732cd93..f94fcaa 100644 --- a/src/kernel/hardware.c +++ b/src/kernel/hardware.c @@ -69,7 +69,8 @@ void hw_detect(void) gint[HWCALC] = HWCALC_FX9860G_SH4; if(gint[HWMPU] == HWMPU_SH7337 || gint[HWMPU] == HWMPU_SH7355) { - gint[HWCALC] = HWCALC_FX9860G_SH3; + gint[HWCALC] = (SH7705_PFC.PEDR & 0x08) ? HWCALC_FX9860G_SH3 : + HWCALC_FX9860G_SLIM; } /* Tell Graph 35+E II from OS version (this is accurate unless someone diff --git a/src/kernel/inth.S b/src/kernel/inth.S index b071afc..4823cd7 100644 --- a/src/kernel/inth.S +++ b/src/kernel/inth.S @@ -102,7 +102,7 @@ _gint_inth_7305: #ifdef FX9860G -/* SH7705-TYPE INTERRUT HANDLER ENTRY - 56 BYTES */ +/* SH7705-TYPE INTERRUPT HANDLER ENTRY - 56 BYTES */ _gint_inth_7705: /* Save caller-saved registers as before */