From 90157f59301ad060ff04c57143ab37b781013825 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Mon, 11 Nov 2024 20:15:54 +0000 Subject: [PATCH 1/6] Add menu customization readme --- README.md | 1 + docs/07_menu_customization.md | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 docs/07_menu_customization.md diff --git a/README.md b/README.md index 974577ba..75b5ecb9 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ An open source menu for N64 flashcarts. ## Documentation * [Getting started guide](./docs/00_getting_started_sd.md) * [Menu controls](./docs/01_menu_controls.md) +* [Menu customizations](./docs/07_menu_customizations.md) * [Developer guide](./docs/99_developer_guide.md) ## Video showcase (as of Oct 12 2023) diff --git a/docs/07_menu_customization.md b/docs/07_menu_customization.md new file mode 100644 index 00000000..99807b21 --- /dev/null +++ b/docs/07_menu_customization.md @@ -0,0 +1,5 @@ +# Menu customization + +## Using a custom font +Add a `font64` file to the root directory called "custom.font64" +This can be build using `libdragon` tools. From e83991a9871eae04c064e198cd16843cf172a2ec Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 22 Nov 2024 19:33:26 +0000 Subject: [PATCH 2/6] Update libdragon --- libdragon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdragon b/libdragon index 0c4e3888..23bba79a 160000 --- a/libdragon +++ b/libdragon @@ -1 +1 @@ -Subproject commit 0c4e388851cabab52f421bff5e75e9dc3ab36c72 +Subproject commit 23bba79ab570c4504e8707e34ac935c669e57d32 From 09d9648f6aa6165c3e9f87656a9bbff36c23987d Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 22 Nov 2024 20:08:39 +0000 Subject: [PATCH 3/6] Improve RTC component name --- src/menu/views/rtc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/menu/views/rtc.c b/src/menu/views/rtc.c index f7e93dad..0283f762 100644 --- a/src/menu/views/rtc.c +++ b/src/menu/views/rtc.c @@ -72,8 +72,8 @@ void adjust_rtc_time( struct tm *t, int incr ) { *t = *gmtime( ×tamp ); } -void component_editdatetime_draw ( struct tm t, rtc_field_t selected_field ) { - // FIXME: move this to components.c once improved. +void rtc_ui_component_editdatetime_draw ( struct tm t, rtc_field_t selected_field ) { + // FIXME: move this to ui_components.c once improved. /* Format RTC date/time as strings */ char full_dt[30]; char current_selection_chars[30]; @@ -227,7 +227,7 @@ static void draw (menu_t *menu, surface_t *d) { } if (is_editing_mode) { - component_editdatetime_draw(rtc_tm, editing_field_type); + rtc_ui_component_editdatetime_draw(rtc_tm, editing_field_type); } rdpq_detach_show(); From 1eec461d3efe0210019550fb498658f581e82736 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 22 Nov 2024 20:20:57 +0000 Subject: [PATCH 4/6] Fix RTC wrap --- src/menu/views/rtc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/menu/views/rtc.c b/src/menu/views/rtc.c index 0283f762..3df38a6d 100644 --- a/src/menu/views/rtc.c +++ b/src/menu/views/rtc.c @@ -5,8 +5,8 @@ #include "../sound.h" #include "views.h" -#define MAX(a,b) ({ typeof(a) _a = a; typeof(b) _b = b; _a > _b ? _a : _b; }) -#define MIN(a,b) ({ typeof(a) _a = a; typeof(b) _b = b; _a < _b ? _a : _b; }) +#define MAX(a,b) (((a) > (b)) ? (a) : (b)) +#define MIN(a,b) (((a) < (b)) ? (a) : (b)) #define CLAMP(x, min, max) (MIN(MAX((x), (min)), (max))) #define YEAR_MIN 1996 @@ -27,7 +27,7 @@ static struct tm rtc_tm = {0}; static bool is_editing_mode; static rtc_field_t editing_field_type; -int wrap( uint16_t val, uint16_t min, uint16_t max ) { +int wrap( int val, uint16_t min, uint16_t max ) { if( val < min ) return max; if( val > max ) return min; return val; From b779af4db3ca098ba1572acc0c70cbdcda07b133 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Sun, 24 Nov 2024 16:49:40 +0000 Subject: [PATCH 5/6] Smsplus64 Emulator (#159) ## Description Switch to smsPlus64 (https://github.com/fhoedemakers/smsplus64) from TotalSMS. ## Motivation and Context This emulator, although still WIP (like most others) works with the plugin system. ## How Has This Been Tested? ## Screenshots ## Types of changes - [x] Improvement (non-breaking change that adds a new feature) - [ ] Bug fix (fixes an issue) - [ ] Breaking change (breaking change) - [ ] Documentation Improvement - [ ] Config and build (change in the configuration and build system, has no impact on code or features) ## Checklist: - [x] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [x] I have updated the documentation accordingly. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. Signed-off-by: GITHUB_USER --- README.md | 2 +- docs/00_getting_started_sd.md | 4 +++- src/menu/cart_load.c | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 75b5ecb9..a3beb078 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ An open source menu for N64 flashcarts. * Fully Open Source. * Loads all known N64 games (including iQue and Aleck64 ROMs (even if they are byteswapped)). * Fully emulates the 64DD and loads 64DD disks (SummerCart64 only). -* Emulator support (NES, SNES, GB, GBC) ROMs. +* Emulator support (NES, SNES, GB, GBC, SMS, GG) ROMs. * N64 ROM box image support. * Background image (PNG) support. * Comprehensive ROM save database (including HomeBrew headers). diff --git a/docs/00_getting_started_sd.md b/docs/00_getting_started_sd.md index f2f75de8..00f1f59d 100644 --- a/docs/00_getting_started_sd.md +++ b/docs/00_getting_started_sd.md @@ -22,6 +22,7 @@ Menu currently supports the following emulators and associated ROM file names: - **NES**: [neon64v2](https://github.com/hcs64/neon64v2/releases) by *hcs64* - `neon64bu.rom` - **SNES**: [sodium64](https://github.com/Hydr8gon/sodium64/releases) by *Hydr8gon* - `sodium64.z64` - **Game Boy** / **GB Color**: [gb64](https://lambertjamesd.github.io/gb64/romwrapper/romwrapper.html) by *lambertjamesd* - `gb.v64` / `gbc.v64` ("Download Emulator" button) +- **SMS** / **GG**: [smsPlus64](https://github.com/fhoedemakers/smsplus64/releases) by *fhoedmakers* - `smsPlus64.z64` ### 64DD disk support @@ -48,7 +49,8 @@ SD:\ │ ├── neon64bu.rom │ ├── sodium64.z64 │ ├── gb.v64 -│ └── gbc.v64 +│ ├── gbc.v64 +│ └── smsPlus64.v64 │ ├── (a rom).z64 ├── (a rom).n64 diff --git a/src/menu/cart_load.c b/src/menu/cart_load.c index b57afb6c..003c4045 100644 --- a/src/menu/cart_load.c +++ b/src/menu/cart_load.c @@ -177,8 +177,8 @@ cart_load_err_t cart_load_emulator (menu_t *menu, cart_load_emu_type_t emu_type, save_type = FLASHCART_SAVE_TYPE_FLASHRAM_1MBIT; break; case CART_LOAD_EMU_TYPE_SEGA_GENERIC_8BIT: - path_push(path, "TotalSMS.z64"); - save_type = FLASHCART_SAVE_TYPE_SRAM_256KBIT; + path_push(path, "smsPlus64.z64"); + save_type = FLASHCART_SAVE_TYPE_NONE; break; } From 058c41b8e0bea7ed65e6f172933ba981b9287800 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Sun, 24 Nov 2024 16:54:10 +0000 Subject: [PATCH 6/6] Update 00_getting_started_sd.md Corrected extension type. --- docs/00_getting_started_sd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/00_getting_started_sd.md b/docs/00_getting_started_sd.md index 00f1f59d..650e4cd9 100644 --- a/docs/00_getting_started_sd.md +++ b/docs/00_getting_started_sd.md @@ -50,7 +50,7 @@ SD:\ │ ├── sodium64.z64 │ ├── gb.v64 │ ├── gbc.v64 -│ └── smsPlus64.v64 +│ └── smsPlus64.z64 │ ├── (a rom).z64 ├── (a rom).n64