Merge branch 'develop' into improve-rom-info

This commit is contained in:
Robin Jones 2024-11-24 17:44:39 +00:00 committed by GitHub
commit a5ffb3c4d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 19 additions and 11 deletions

View File

@ -18,7 +18,7 @@ An open source menu for N64 flashcarts.
* Fully Open Source. * Fully Open Source.
* Loads all known N64 games (including iQue and Aleck64 ROMs (even if they are byteswapped)). * 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). * 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. * N64 ROM box image support.
* Background image (PNG) support. * Background image (PNG) support.
* Comprehensive ROM save database (including HomeBrew headers). * Comprehensive ROM save database (including HomeBrew headers).
@ -32,6 +32,7 @@ An open source menu for N64 flashcarts.
## Documentation ## Documentation
* [Getting started guide](./docs/00_getting_started_sd.md) * [Getting started guide](./docs/00_getting_started_sd.md)
* [Menu controls](./docs/01_menu_controls.md) * [Menu controls](./docs/01_menu_controls.md)
* [Menu customizations](./docs/07_menu_customizations.md)
* [Developer guide](./docs/99_developer_guide.md) * [Developer guide](./docs/99_developer_guide.md)
## Video showcase (as of Oct 12 2023) ## Video showcase (as of Oct 12 2023)

View File

@ -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` - **NES**: [neon64v2](https://github.com/hcs64/neon64v2/releases) by *hcs64* - `neon64bu.rom`
- **SNES**: [sodium64](https://github.com/Hydr8gon/sodium64/releases) by *Hydr8gon* - `sodium64.z64` - **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) - **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 ### 64DD disk support
@ -48,7 +49,8 @@ SD:\
│ ├── neon64bu.rom │ ├── neon64bu.rom
│ ├── sodium64.z64 │ ├── sodium64.z64
│ ├── gb.v64 │ ├── gb.v64
│ └── gbc.v64 │ ├── gbc.v64
│ └── smsPlus64.z64
├── (a rom).z64 ├── (a rom).z64
├── (a rom).n64 ├── (a rom).n64

View File

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

@ -1 +1 @@
Subproject commit 0c4e388851cabab52f421bff5e75e9dc3ab36c72 Subproject commit 23bba79ab570c4504e8707e34ac935c669e57d32

View File

@ -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; save_type = FLASHCART_SAVE_TYPE_FLASHRAM_1MBIT;
break; break;
case CART_LOAD_EMU_TYPE_SEGA_GENERIC_8BIT: case CART_LOAD_EMU_TYPE_SEGA_GENERIC_8BIT:
path_push(path, "TotalSMS.z64"); path_push(path, "smsPlus64.z64");
save_type = FLASHCART_SAVE_TYPE_SRAM_256KBIT; save_type = FLASHCART_SAVE_TYPE_NONE;
break; break;
} }

View File

@ -5,8 +5,8 @@
#include "../sound.h" #include "../sound.h"
#include "views.h" #include "views.h"
#define MAX(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) ({ typeof(a) _a = a; typeof(b) _b = b; _a < _b ? _a : _b; }) #define MIN(a,b) (((a) < (b)) ? (a) : (b))
#define CLAMP(x, min, max) (MIN(MAX((x), (min)), (max))) #define CLAMP(x, min, max) (MIN(MAX((x), (min)), (max)))
#define YEAR_MIN 1996 #define YEAR_MIN 1996
@ -27,7 +27,7 @@ static struct tm rtc_tm = {0};
static bool is_editing_mode; static bool is_editing_mode;
static rtc_field_t editing_field_type; 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 < min ) return max;
if( val > max ) return min; if( val > max ) return min;
return val; return val;
@ -72,8 +72,8 @@ void adjust_rtc_time( struct tm *t, int incr ) {
*t = *gmtime( &timestamp ); *t = *gmtime( &timestamp );
} }
void component_editdatetime_draw ( struct tm t, rtc_field_t selected_field ) { void rtc_ui_component_editdatetime_draw ( struct tm t, rtc_field_t selected_field ) {
// FIXME: move this to components.c once improved. // FIXME: move this to ui_components.c once improved.
/* Format RTC date/time as strings */ /* Format RTC date/time as strings */
char full_dt[30]; char full_dt[30];
char current_selection_chars[30]; char current_selection_chars[30];
@ -227,7 +227,7 @@ static void draw (menu_t *menu, surface_t *d) {
} }
if (is_editing_mode) { 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(); rdpq_detach_show();