Add Fairchild Channel F emulator support (#166)

<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->
Adds the required changes for supporting the Fairchild Channel F
emulator.

## Motivation and Context
<!--- What does this sample do? What problem does it solve? -->
<!--- If it fixes/closes/resolves an open issue, please link to the
issue here -->
Support more emulators.

## How Has This Been Tested?
<!-- (if applicable) -->
<!--- Please describe in detail how you tested your sample/changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->
Still required.

## Screenshots
<!-- (if appropriate): -->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [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:
<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
- [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.

<!--- It would be nice if you could sign off your contribution by
replacing the name with your GitHub user name and GitHub email contact.
-->
Signed-off-by: GITHUB_USER <GITHUB_USER_EMAIL>
This commit is contained in:
Robin Jones 2024-12-04 12:30:38 +00:00 committed by GitHub
parent 058c41b8e0
commit a7669b1057
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 17 additions and 4 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, SMS, GG) ROMs. * Emulator support (NES, SNES, GB, GBC, SMS, GG, CHF) 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).

View File

@ -23,6 +23,7 @@ Menu currently supports the following emulators and associated ROM file names:
- **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` - **SMS** / **GG**: [smsPlus64](https://github.com/fhoedemakers/smsplus64/releases) by *fhoedmakers* - `smsPlus64.z64`
- **Fairchild Channel F**: [Press-F-Ultra](https://github.com/celerizer/Press-F-Ultra/releases) by *celerizer* - `Press-F.z64`
### 64DD disk support ### 64DD disk support
@ -50,7 +51,8 @@ SD:\
│ ├── sodium64.z64 │ ├── sodium64.z64
│ ├── gb.v64 │ ├── gb.v64
│ ├── gbc.v64 │ ├── gbc.v64
│ └── smsPlus64.z64 │ ├── smsPlus64.z64
│ └── Press-F.z64
├── (a rom).z64 ├── (a rom).z64
├── (a rom).n64 ├── (a rom).n64

View File

@ -180,6 +180,10 @@ cart_load_err_t cart_load_emulator (menu_t *menu, cart_load_emu_type_t emu_type,
path_push(path, "smsPlus64.z64"); path_push(path, "smsPlus64.z64");
save_type = FLASHCART_SAVE_TYPE_NONE; save_type = FLASHCART_SAVE_TYPE_NONE;
break; break;
case CART_LOAD_EMU_TYPE_FAIRCHILD_CHANNELF:
path_push(path, "Press-F.z64");
save_type = FLASHCART_SAVE_TYPE_NONE;
break;
} }
if (!file_exists(path_get(path))) { if (!file_exists(path_get(path))) {

View File

@ -54,6 +54,8 @@ typedef enum {
CART_LOAD_EMU_TYPE_GAMEBOY_COLOR, CART_LOAD_EMU_TYPE_GAMEBOY_COLOR,
/** @brief The ROM is designed for a Sega 8Bit system (Game Gear or Master System). */ /** @brief The ROM is designed for a Sega 8Bit system (Game Gear or Master System). */
CART_LOAD_EMU_TYPE_SEGA_GENERIC_8BIT, CART_LOAD_EMU_TYPE_SEGA_GENERIC_8BIT,
/** @brief The ROM is designed for a Fairchild Channel F system. */
CART_LOAD_EMU_TYPE_FAIRCHILD_CHANNELF,
} cart_load_emu_type_t; } cart_load_emu_type_t;

View File

@ -11,7 +11,7 @@
static const char *rom_extensions[] = { "z64", "n64", "v64", "rom", NULL }; static const char *rom_extensions[] = { "z64", "n64", "v64", "rom", NULL };
static const char *disk_extensions[] = { "ndd", NULL }; static const char *disk_extensions[] = { "ndd", NULL };
static const char *emulator_extensions[] = { "nes", "sfc", "smc", "gb", "gbc", "sms", "gg", "sg", NULL }; static const char *emulator_extensions[] = { "nes", "sfc", "smc", "gb", "gbc", "sms", "gg", "sg", "chf", NULL };
// TODO: "eep", "sra", "srm", "fla" could be used if transfered from different flashcarts. // TODO: "eep", "sra", "srm", "fla" could be used if transfered from different flashcarts.
static const char *save_extensions[] = { "sav", NULL }; static const char *save_extensions[] = { "sav", NULL };
static const char *image_extensions[] = { "png", NULL }; static const char *image_extensions[] = { "png", NULL };

View File

@ -14,7 +14,7 @@ static const char *archive_extensions[] = { "zip", "rar", "7z", "tar", "gz", NUL
static const char *image_extensions[] = { "png", "jpg", "gif", NULL }; static const char *image_extensions[] = { "png", "jpg", "gif", NULL };
static const char *music_extensions[] = { "mp3", "wav", "ogg", "wma", "flac", NULL }; static const char *music_extensions[] = { "mp3", "wav", "ogg", "wma", "flac", NULL };
static const char *controller_pak_extensions[] = { "mpk", "pak", NULL }; static const char *controller_pak_extensions[] = { "mpk", "pak", NULL };
static const char *emulator_extensions[] = { "nes", "smc", "gb", "gbc", "sms", "gg", NULL }; static const char *emulator_extensions[] = { "nes", "smc", "gb", "gbc", "sms", "gg", "chf", NULL };
static struct stat st; static struct stat st;

View File

@ -10,6 +10,7 @@ static const char *emu_snes_rom_extensions[] = { "sfc", "smc", NULL };
static const char *emu_gameboy_rom_extensions[] = { "gb", NULL }; static const char *emu_gameboy_rom_extensions[] = { "gb", NULL };
static const char *emu_gameboy_color_rom_extensions[] = { "gbc", NULL }; static const char *emu_gameboy_color_rom_extensions[] = { "gbc", NULL };
static const char *emu_sega_8bit_rom_extensions[] = { "sms", "gg", "sg", NULL }; static const char *emu_sega_8bit_rom_extensions[] = { "sms", "gg", "sg", NULL };
static const char *emu_fairchild_channelf_rom_extensions[] = { "chf", NULL };
static cart_load_emu_type_t emu_type; static cart_load_emu_type_t emu_type;
@ -25,6 +26,8 @@ static char *format_emulator_name (cart_load_emu_type_t emulator_info) {
return "Nintendo GAMEBOY Color"; return "Nintendo GAMEBOY Color";
case CART_LOAD_EMU_TYPE_SEGA_GENERIC_8BIT: case CART_LOAD_EMU_TYPE_SEGA_GENERIC_8BIT:
return "SEGA 8bit system"; return "SEGA 8bit system";
case CART_LOAD_EMU_TYPE_FAIRCHILD_CHANNELF:
return "Fairchild Channel F";
default: default:
return "Unknown"; return "Unknown";
} }
@ -120,6 +123,8 @@ void view_load_emulator_init (menu_t *menu) {
emu_type = CART_LOAD_EMU_TYPE_GAMEBOY_COLOR; emu_type = CART_LOAD_EMU_TYPE_GAMEBOY_COLOR;
} else if (file_has_extensions(path_get(path), emu_sega_8bit_rom_extensions)) { } else if (file_has_extensions(path_get(path), emu_sega_8bit_rom_extensions)) {
emu_type = CART_LOAD_EMU_TYPE_SEGA_GENERIC_8BIT; emu_type = CART_LOAD_EMU_TYPE_SEGA_GENERIC_8BIT;
} else if (file_has_extensions(path_get(path), emu_fairchild_channelf_rom_extensions)) {
emu_type = CART_LOAD_EMU_TYPE_FAIRCHILD_CHANNELF;
} else { } else {
menu_show_error(menu, "Unsupported ROM"); menu_show_error(menu, "Unsupported ROM");
} }