Compare commits

...

2 Commits

Author SHA1 Message Date
calamari ddf340cccd Support gint_osmenu() on fx-9860G Slim 2022-09-25 10:37:41 -07:00
calamari 5c331e5fa0 Add isSlim() macro 2022-09-25 10:37:18 -07:00
4 changed files with 13 additions and 3 deletions

View File

@ -45,6 +45,12 @@ void hw_detect(void);
#define isSH4() (!isSH3())
#endif
#if defined(FX9860G)
#define isSlim() (gint[HWCALC] == HWCALC_FX9860G_SLIM)
#else
#define isSlim() 0
#endif
#ifdef FXCG50
#define isSH3() 0
#define isSH4() 1

View File

@ -1,5 +1,6 @@
#include <gint/gint.h>
#include <gint/display.h>
#include <gint/hardware.h>
#include <string.h>
@ -17,7 +18,10 @@ static int __osmenu_id;
static void __osmenu_handler(void)
{
__PutKeyCode(0x04, 0x09, 0);
if (isSlim())
__PutKeyCode(0x07, 0x0A, 0);
else
__PutKeyCode(0x04, 0x09, 0);
__Timer_Stop(__osmenu_id);
__Timer_Deinstall(__osmenu_id);

View File

@ -148,7 +148,7 @@ void iokbd_scan(uint8_t *scan)
for(int i = 0; i < 12; i++) scan[i] = iokbd_row(i);
/* Translate fx-9860G Slim scancodes to standard scancodes */
if (gint[HWCALC] == HWCALC_FX9860G_SLIM)
if (isSlim())
{
uint8_t slim_scan[12];
for (uint i = 0; i < 10; i++)

View File

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