diff --git a/CMakeLists.txt b/CMakeLists.txt index fd65a0a..076dffb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -249,8 +249,14 @@ set(SOURCES_FXASCG # R61524 driver ) -set(ASSETS_FX src/font5x7.png) -set(ASSETS_CG src/font8x9.png) +set(ASSETS_FX + src/font5x7.png +) + +set(ASSETS_CG + src/font8x9.png +) + fxconv_declare_assets(${ASSETS_FX} ${ASSETS_CG}) include_directories( @@ -278,13 +284,13 @@ if("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50) endif() if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G_AS_CG) - add_compile_options(-DFX9860G) + add_compile_options(-DFXCG50) add_compile_definitions(FX9860G_AS_CG) set(NAME "gint-fxascg") set(LINKER_SCRIPTS "${CMAKE_CURRENT_BINARY_DIR}/fxcg50.ld" "${CMAKE_CURRENT_BINARY_DIR}/fxcg50_fastload.ld") - add_library(gint-fxascg STATIC ${SOURCES_COMMON} ${SOURCES_FX} ${SOURCES_FXASCG} ${ASSETS_FX} + add_library(gint-fxascg STATIC ${SOURCES_COMMON} ${SOURCES_CG} ${SOURCES_FXASCG} ${ASSETS_FX} ${LINKER_SCRIPTS}) endif() diff --git a/src/intc/intc.c b/src/intc/intc.c index 10c471a..2acdf50 100644 --- a/src/intc/intc.c +++ b/src/intc/intc.c @@ -11,7 +11,6 @@ //--- // Interrupt controllers //--- - GRODATA3 sh7705_intc_t const SH7705_INTC = { .IPR = { (void *)0xfffffee2, (void *)0xfffffee4, diff --git a/src/kernel/start.c b/src/kernel/start.c index 4421cc8..8b8a268 100644 --- a/src/kernel/start.c +++ b/src/kernel/start.c @@ -26,7 +26,7 @@ extern uint32_t lilram, silram, rilram, /* IL memory section */ lxyram, sxyram, rxyram, /* X and Y memory section */ sbss, rbss; /* User's BSS section */ -#ifdef FX9860G +#if defined(FX9860G) && !defined(FX9860G_AS_CG) extern uint32_t lgmapped, sgmapped, /* Permanently mapped functions */ lreloc, sreloc; /* Relocatable references */ @@ -136,7 +136,7 @@ static int start2(int isappli, int optnum) 1.00 and the fx-9860G emulator) is not clear yet, so gint can't load pages dynamically. Load everything preventively (works only if the add-in is small enough) */ - #ifdef FX9860G + #if defined(FX9860G) && !defined(FX9860G_AS_CG) if(isSH3()) { /* Try to map every ROM address up to _srom */ @@ -159,7 +159,7 @@ static int start2(int isappli, int optnum) gint_load_onchip_sections(); - #ifdef FX9860G + #if defined(FX9860G) && !defined(FX9860G_AS_CG) /* Copy permanently-mapped code to start of user RAM (on fx-CG 50 it is loaded along ILRAM contents) */ void *rgmapped = mmu_uram(); diff --git a/src/render-cg/topti.c b/src/render-cg/topti.c index 31fdb39..3bab6e9 100644 --- a/src/render-cg/topti.c +++ b/src/render-cg/topti.c @@ -9,9 +9,16 @@ #include "topti-asm.h" /* Default font */ -extern font_t gint_font8x9; -font_t const * gint_default_font = &gint_font8x9; -font_t const * topti_font = &gint_font8x9; +#if(FX9860G_AS_CG) + extern font_t gint_font5x7; + font_t const * gint_default_font = &gint_font5x7; + font_t const * topti_font = &gint_font5x7; +#else + extern font_t gint_font8x9; + font_t const * gint_default_font = &gint_font8x9; + font_t const * topti_font = &gint_font8x9; +#endif + /* topti_glyph(): Render a glyph on the VRAM Prints a glyph naively using word accesses, because for most fonts with a