mirror of
https://github.com/Polprzewodnikowy/N64FlashcartMenu.git
synced 2024-11-23 19:19:19 +01:00
Update emulator load display (#46)
<!--- Provide a general summary of your changes in the Title above --> ## Description <!--- Describe your changes in detail --> Update emulator load display to be, well, better. Add TotalSMS (not tested, however, shows that the emulator is not found.) Fix rolling release for new forks. ## 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 --> ## 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. --> ## Screenshots <!-- (if appropriate): --> ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Improvement (non-breaking change that adds a new feature) - [ ] Bug fix (fixes an issue) - [ ] Breaking change (breaking change) - [ ] 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! --> - [ ] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] 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:
parent
9eb6a02707
commit
c44ff7f752
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -74,6 +74,7 @@ jobs:
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag_name: rolling-release
|
||||
continue-on-error: true
|
||||
|
||||
- name: Upload rolling release
|
||||
uses: softprops/action-gh-release@v0.1.15
|
||||
@ -88,6 +89,7 @@ jobs:
|
||||
./output/OS64.v64
|
||||
./output/OS64P.v64
|
||||
./output/sc64menu.n64
|
||||
continue-on-error: true
|
||||
|
||||
generate-docs:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -47,6 +47,7 @@ Menu currently supports the following emulators and associated ROM file names:
|
||||
- **NES**: [neon64v2](https://github.com/hcs64/neon64v2) by *hcs64* - `neon64bu.rom`
|
||||
- **SNES**: [sodium64](https://github.com/Hydr8gon/sodium64) by *Hydr8gon* - `sodium64.z64`
|
||||
- **Game Boy** / **GB Color**: [gb64](https://lambertjamesd.github.io/gb64/romwrapper/romwrapper.html) by *lambertjamesd* - `gb.v64` / `gbc.v64`
|
||||
- **Sega Master System ** / **Sega Game Gear** / ** Sg1000 **: [TotalSMS](https://github.com/ITotalJustice/TotalSMS) - `TotalSMS.z64`
|
||||
|
||||
|
||||
# Developer documentation
|
||||
|
@ -101,6 +101,10 @@ cart_load_err_t cart_load_emulator (menu_t *menu, cart_load_emu_type_t emu_type,
|
||||
path_push(path, "gbc.v64");
|
||||
save_type = FLASHCART_SAVE_TYPE_FLASHRAM;
|
||||
break;
|
||||
case CART_LOAD_EMU_TYPE_SEGA_GENERIC_8BIT:
|
||||
path_push(path, "TotalSMS.z64");
|
||||
save_type = FLASHCART_SAVE_TYPE_SRAM;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!file_exists(path_get(path))) {
|
||||
|
@ -28,6 +28,7 @@ typedef enum {
|
||||
CART_LOAD_EMU_TYPE_SNES,
|
||||
CART_LOAD_EMU_TYPE_GAMEBOY,
|
||||
CART_LOAD_EMU_TYPE_GAMEBOY_COLOR,
|
||||
CART_LOAD_EMU_TYPE_SEGA_GENERIC_8BIT,
|
||||
} cart_load_emu_type_t;
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
static const char *rom_extensions[] = { "z64", "n64", "v64", "rom", NULL };
|
||||
static const char *emulator_extensions[] = { "nes", "sfc", "smc", "gb", "gbc", NULL };
|
||||
static const char *emulator_extensions[] = { "nes", "sfc", "smc", "gb", "gbc", "sms", "gg", "sg", NULL };
|
||||
static const char *save_extensions[] = { "sav", NULL }; // TODO: "eep", "sra", "srm", "fla" could be used if transfered from different flashcarts.
|
||||
static const char *image_extensions[] = { "png", NULL };
|
||||
static const char *music_extensions[] = { "mp3", NULL };
|
||||
|
@ -8,10 +8,28 @@ static const char *emu_nes_rom_extensions[] = { "nes", NULL };
|
||||
static const char *emu_snes_rom_extensions[] = { "sfc", "smc", NULL };
|
||||
static const char *emu_gameboy_rom_extensions[] = { "gb", NULL };
|
||||
static const char *emu_gameboy_color_rom_extensions[] = { "gbc", NULL };
|
||||
static const char *emu_sega_8bit_rom_extensions[] = { "sms", "gg", "sg", NULL };
|
||||
|
||||
static bool load_pending;
|
||||
static cart_load_emu_type_t emu_type;
|
||||
|
||||
static char *format_emulator_name (cart_load_emu_type_t emulator_info) {
|
||||
switch (emulator_info) {
|
||||
case CART_LOAD_EMU_TYPE_NES:
|
||||
return "Nintendo Famicom (NES)";
|
||||
case CART_LOAD_EMU_TYPE_SNES:
|
||||
return "Nintendo Super Famicom (SNES)";
|
||||
case CART_LOAD_EMU_TYPE_GAMEBOY:
|
||||
return "Nintendo GAMEBOY";
|
||||
case CART_LOAD_EMU_TYPE_GAMEBOY_COLOR:
|
||||
return "Nintendo GAMEBOY Color";
|
||||
case CART_LOAD_EMU_TYPE_SEGA_GENERIC_8BIT:
|
||||
return "SEGA 8bit system";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void process (menu_t *menu) {
|
||||
if (menu->actions.enter) {
|
||||
@ -33,17 +51,22 @@ static void draw (menu_t *menu, surface_t *d) {
|
||||
|
||||
component_main_text_draw(
|
||||
ALIGN_CENTER, VALIGN_TOP,
|
||||
"Emulator information\n"
|
||||
"THE EMULATOR\n"
|
||||
"Rom Name\n"
|
||||
"Load Emulated ROM\n"
|
||||
);
|
||||
|
||||
component_main_text_draw(
|
||||
ALIGN_LEFT, VALIGN_TOP,
|
||||
"\n"
|
||||
"%s",
|
||||
"\n"
|
||||
"Emulated System: %s\n"
|
||||
"Rom Name: %s",
|
||||
format_emulator_name(emu_type),
|
||||
menu->browser.entry->name
|
||||
);
|
||||
|
||||
component_actions_bar_text_draw(
|
||||
ALIGN_LEFT, VALIGN_TOP,
|
||||
"A: Load and run Emulator ROM\n"
|
||||
"A: Load and run Emulated ROM\n"
|
||||
"B: Exit"
|
||||
);
|
||||
}
|
||||
@ -93,6 +116,8 @@ void view_load_emulator_init (menu_t *menu) {
|
||||
emu_type = CART_LOAD_EMU_TYPE_GAMEBOY;
|
||||
} else if (file_has_extensions(path_get(path), emu_gameboy_color_rom_extensions)) {
|
||||
emu_type = CART_LOAD_EMU_TYPE_GAMEBOY_COLOR;
|
||||
} else if (file_has_extensions(path_get(path), emu_sega_8bit_rom_extensions)) {
|
||||
emu_type = CART_LOAD_EMU_TYPE_SEGA_GENERIC_8BIT;
|
||||
} else {
|
||||
menu_show_error(menu, "Unsupported ROM");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user