mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2024-12-28 20:43:36 +01:00
hardware: expose filesystem type in the hardware info
Filesystem type is detected with a trivial heuristic: * fx-9860G: CASIOWIN, unless Fugue in the G-III series (OS >= 3.00) * fx-CG 50: Always Fugue
This commit is contained in:
parent
86fad757e1
commit
2e5e56f82e
2 changed files with 23 additions and 2 deletions
|
@ -70,6 +70,7 @@ void hw_detect(void);
|
||||||
#define HWKBD 8 /* Keyboard */
|
#define HWKBD 8 /* Keyboard */
|
||||||
#define HWKBDSF /* Deprecated: use keysc_scan_frequency() */
|
#define HWKBDSF /* Deprecated: use keysc_scan_frequency() */
|
||||||
#define HWDD /* Deprecated: use the T6K11/R61524 API */
|
#define HWDD /* Deprecated: use the T6K11/R61524 API */
|
||||||
|
#define HWFS 11 /* Filesystem type */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** MPU type
|
** MPU type
|
||||||
|
@ -118,6 +119,17 @@ void hw_detect(void);
|
||||||
/* The keyboard uses a KEYSC-based scan method. This is only possible on SH4 */
|
/* The keyboard uses a KEYSC-based scan method. This is only possible on SH4 */
|
||||||
#define HWKBD_KSI 0x04
|
#define HWKBD_KSI 0x04
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Filesystem type
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Unknown or no filesystem. */
|
||||||
|
#define HWFS_NONE 0
|
||||||
|
/* CASIO's in-house filesystem, now deprecated. */
|
||||||
|
#define HWFS_CASIOWIN 1
|
||||||
|
/* Wrapper around Kyoto Software Research's Fugue VFAT implementation. */
|
||||||
|
#define HWFS_FUGUE 2
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -78,7 +78,15 @@ void hw_detect(void)
|
||||||
be real, is enough for now.
|
be real, is enough for now.
|
||||||
TODO: Try to detect Graph 35+E II from amount of ROM in BSC? */
|
TODO: Try to detect Graph 35+E II from amount of ROM in BSC? */
|
||||||
char *version = (void *)0x80010020;
|
char *version = (void *)0x80010020;
|
||||||
if(version[1] == '3') gint[HWCALC] = HWCALC_G35PE2;
|
if(version[1] == '3')
|
||||||
|
{
|
||||||
|
gint[HWCALC] = HWCALC_G35PE2;
|
||||||
|
gint[HWFS] = HWFS_FUGUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gint[HWFS] = HWFS_CASIOWIN;
|
||||||
|
}
|
||||||
|
|
||||||
/* Detect RAM by checking if 8804'0000 is the same as 8800'0000. */
|
/* Detect RAM by checking if 8804'0000 is the same as 8800'0000. */
|
||||||
|
|
||||||
|
@ -121,7 +129,8 @@ void hw_detect(void)
|
||||||
/* Tell Prizms apart from fx-CG 50 by checking the stack address*/
|
/* Tell Prizms apart from fx-CG 50 by checking the stack address*/
|
||||||
uint32_t stack;
|
uint32_t stack;
|
||||||
__asm__("mov r15, %0" : "=r"(stack));
|
__asm__("mov r15, %0" : "=r"(stack));
|
||||||
gint[HWCALC] = (stack < 0x8c000000) ? HWCALC_PRIZM : HWCALC_FXCG50;
|
gint[HWCALC] = (stack < 0x8c000000) ? HWCALC_PRIZM : HWCALC_FXCG50;
|
||||||
|
gint[HWFS] = HWFS_FUGUE;
|
||||||
|
|
||||||
/* Tell the fx-CG emulator apart using the product ID */
|
/* Tell the fx-CG emulator apart using the product ID */
|
||||||
uint8_t *productID = (void *)0x8001ffd0;
|
uint8_t *productID = (void *)0x8001ffd0;
|
||||||
|
|
Loading…
Reference in a new issue