Compare commits

...

2 Commits

Author SHA1 Message Date
calamari a4adc5e1bd Support fx-9860G Slim backlight 2022-09-24 19:49:29 -07:00
calamari b23ed9629e Add HWCALC entry for fx-9860G Slim 2022-09-24 19:48:07 -07:00
4 changed files with 15 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -168,8 +168,16 @@ void t6k11_backlight(int setting)
TODO: Document the PFC to remove these addresses */
if(isSH3())
{
port = (void *)0xa400012c;
mask = 0x80;
if (gint[HWCALC] == HWCALC_FX9860G_SLIM)
{
port = (void *)0xa4000126;
mask = 0x20;
}
else
{
port = (void *)0xa400012c;
mask = 0x80;
}
}
else
{