mirror of
https://github.com/Polprzewodnikowy/N64FlashcartMenu.git
synced 2024-11-24 19:46:54 +01:00
Added SNES emulator + changed emulator names to default
This commit is contained in:
parent
3db859b0f7
commit
9603e044e6
31
README.md
31
README.md
@ -12,7 +12,7 @@ An open source menu for N64 flashcarts.
|
|||||||
## Current (notable) menu features
|
## Current (notable) menu features
|
||||||
* Fully Open Source.
|
* Fully Open Source.
|
||||||
* Loads all known N64 games (including iQue and byteswapped ROMs).
|
* Loads all known N64 games (including iQue and byteswapped ROMs).
|
||||||
* Emulator support (GB, GBC, NES) ROMs.
|
* Emulator support (NES, SNES, GB, GBC) 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).
|
||||||
@ -24,7 +24,7 @@ An open source menu for N64 flashcarts.
|
|||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
### SC64
|
### SC64
|
||||||
Ensure the cart is running the latest [firmware](https://github.com/Polprzewodnikowy/SummerCart64/releases/latest)
|
Ensure the cart is running the latest [firmware](https://github.com/Polprzewodnikowy/SummerCart64/releases/latest).
|
||||||
Download the `sc64menu.n64` ROM from the latest action run assets.
|
Download the `sc64menu.n64` ROM from the latest action run assets.
|
||||||
Add it to the root folder on your SD card.
|
Add it to the root folder on your SD card.
|
||||||
|
|
||||||
@ -36,16 +36,17 @@ The aim is to replace [Altra64](https://github.com/networkfusion/altra64) and [E
|
|||||||
### Common to all
|
### Common to all
|
||||||
|
|
||||||
#### ROM Boxart
|
#### ROM Boxart
|
||||||
To use boxart, you need to place png files of size 158x112 in the folder `sd://menu/boxart/`
|
To use boxart, you need to place png files of size 158x112 in the folder `/menu/boxart` on the SD card.
|
||||||
Each file must be named according to the 2 letter ROM ID. e.g. for goldeneye, this would be `GE.png`
|
Each file must be named according to the 2 letter ROM ID. e.g. for goldeneye, this would be `GE.png`.
|
||||||
A known set of PNG files can be downloaded from https://mega.nz/file/6cNGwSqI#8X5ukb65n3YMlGaUtSOGXkKo9HxVnnMOgqn94Epcr7w
|
A known set of PNG files can be downloaded [here](https://mega.nz/file/6cNGwSqI#8X5ukb65n3YMlGaUtSOGXkKo9HxVnnMOgqn94Epcr7w).
|
||||||
|
|
||||||
#### Emulator support
|
#### Emulator support
|
||||||
Emulators should be added to the `sd:/emulators/` folder
|
Emulators should be added to the `/emulators` directory on the SD card.
|
||||||
|
|
||||||
The menu currently supports the following emulators and associated ROM's:
|
Menu currently supports the following emulators and associated ROM file names:
|
||||||
* neon64v2 (https://github.com/hcs64/neon64v2) - emu.nes
|
- **NES**: [neon64v2](https://github.com/hcs64/neon64v2) by *hcs64* - `neon64bu.rom`
|
||||||
* gb64 (https://lambertjamesd.github.io/gb64/romwrapper/romwrapper.html) - emu.gb, emu.gbc
|
- **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`
|
||||||
|
|
||||||
|
|
||||||
# Developer documentation
|
# Developer documentation
|
||||||
@ -94,9 +95,9 @@ Run `doxygen` from the dev container terminal.
|
|||||||
Make sure you fix the warnings before creating a PR!
|
Make sure you fix the warnings before creating a PR!
|
||||||
Generated documentation is located in `output/docs` folder.
|
Generated documentation is located in `output/docs` folder.
|
||||||
|
|
||||||
|
# Open source software and licenses used
|
||||||
# OSS licenses used for libraries
|
- [libdragon](https://github.com/DragonMinded/libdragon) (UNLICENSE License)
|
||||||
* UNLICENSE (libdragon)
|
- [libspng](https://github.com/randy408/libspng) (BSD 2-Clause License)
|
||||||
* BSD 2-Clause (libspng)
|
- [mini.c](https://github.com/univrsal/mini.c) (BSD 2-Clause License)
|
||||||
* CC0 1.0 Universal (minimp3)
|
- [minimp3](https://github.com/lieff/minimp3) (CC0 1.0 Universal)
|
||||||
* Permissive, unspecific (miniz)
|
- [miniz](https://github.com/richgel999/miniz) (MIT License)
|
||||||
|
@ -85,15 +85,20 @@ cart_load_err_t cart_load_emulator (menu_t *menu, cart_load_emu_type_t emu_type,
|
|||||||
|
|
||||||
switch (emu_type) {
|
switch (emu_type) {
|
||||||
case CART_LOAD_EMU_TYPE_NES:
|
case CART_LOAD_EMU_TYPE_NES:
|
||||||
path_push(path, "emu.nes");
|
path_push(path, "neon64bu.rom");
|
||||||
save_type = FLASHCART_SAVE_TYPE_SRAM_BANKED;
|
save_type = FLASHCART_SAVE_TYPE_SRAM_BANKED;
|
||||||
break;
|
break;
|
||||||
|
case CART_LOAD_EMU_TYPE_SNES:
|
||||||
|
path_push(path, "sodium64.z64");
|
||||||
|
save_type = FLASHCART_SAVE_TYPE_SRAM;
|
||||||
|
emulated_rom_offset = 0x104000;
|
||||||
|
break;
|
||||||
case CART_LOAD_EMU_TYPE_GAMEBOY:
|
case CART_LOAD_EMU_TYPE_GAMEBOY:
|
||||||
path_push(path, "emu.gb");
|
path_push(path, "gb.v64");
|
||||||
save_type = FLASHCART_SAVE_TYPE_FLASHRAM;
|
save_type = FLASHCART_SAVE_TYPE_FLASHRAM;
|
||||||
break;
|
break;
|
||||||
case CART_LOAD_EMU_TYPE_GAMEBOY_COLOR:
|
case CART_LOAD_EMU_TYPE_GAMEBOY_COLOR:
|
||||||
path_push(path, "emu.gbc");
|
path_push(path, "gbc.v64");
|
||||||
save_type = FLASHCART_SAVE_TYPE_FLASHRAM;
|
save_type = FLASHCART_SAVE_TYPE_FLASHRAM;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -113,6 +118,14 @@ cart_load_err_t cart_load_emulator (menu_t *menu, cart_load_emu_type_t emu_type,
|
|||||||
|
|
||||||
path = path_clone_push(menu->browser.directory, menu->browser.entry->name);
|
path = path_clone_push(menu->browser.directory, menu->browser.entry->name);
|
||||||
|
|
||||||
|
switch (emu_type) {
|
||||||
|
case CART_LOAD_EMU_TYPE_SNES:
|
||||||
|
emulated_file_offset = ((file_get_size(path_get(path)) & 0x3FF) == 0x200) ? 0x200 : 0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
menu->flashcart_error = flashcart_load_file(path_get(path), emulated_rom_offset, emulated_file_offset);
|
menu->flashcart_error = flashcart_load_file(path_get(path), emulated_rom_offset, emulated_file_offset);
|
||||||
if (menu->flashcart_error != FLASHCART_OK) {
|
if (menu->flashcart_error != FLASHCART_OK) {
|
||||||
path_free(path);
|
path_free(path);
|
||||||
|
@ -25,6 +25,7 @@ typedef enum {
|
|||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CART_LOAD_EMU_TYPE_NES,
|
CART_LOAD_EMU_TYPE_NES,
|
||||||
|
CART_LOAD_EMU_TYPE_SNES,
|
||||||
CART_LOAD_EMU_TYPE_GAMEBOY,
|
CART_LOAD_EMU_TYPE_GAMEBOY,
|
||||||
CART_LOAD_EMU_TYPE_GAMEBOY_COLOR,
|
CART_LOAD_EMU_TYPE_GAMEBOY_COLOR,
|
||||||
} cart_load_emu_type_t;
|
} cart_load_emu_type_t;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
static const char *rom_extensions[] = { "z64", "n64", "v64", "rom", NULL };
|
static const char *rom_extensions[] = { "z64", "n64", "v64", "rom", NULL };
|
||||||
static const char *emulator_extensions[] = { "nes", "gb", "gbc", "smc", "gen", "smd", NULL };
|
static const char *emulator_extensions[] = { "nes", "sfc", "smc", "gb", "gbc", NULL };
|
||||||
static const char *save_extensions[] = { "sav", NULL }; // TODO: "eep", "sra", "srm", "fla" could be used if transfered from different flashcarts.
|
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 *image_extensions[] = { "png", NULL };
|
||||||
static const char *music_extensions[] = { "mp3", NULL };
|
static const char *music_extensions[] = { "mp3", NULL };
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
|
|
||||||
static const char *emu_nes_rom_extensions[] = { "nes", NULL };
|
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_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_rom_extensions[] = {"smc", "gen", "smd", NULL };
|
|
||||||
|
|
||||||
static bool load_pending;
|
static bool load_pending;
|
||||||
static cart_load_emu_type_t emu_type;
|
static cart_load_emu_type_t emu_type;
|
||||||
@ -87,12 +87,12 @@ void view_load_emulator_init (menu_t *menu) {
|
|||||||
|
|
||||||
if (file_has_extensions(path_get(path), emu_nes_rom_extensions)) {
|
if (file_has_extensions(path_get(path), emu_nes_rom_extensions)) {
|
||||||
emu_type = CART_LOAD_EMU_TYPE_NES;
|
emu_type = CART_LOAD_EMU_TYPE_NES;
|
||||||
|
} else if (file_has_extensions(path_get(path), emu_snes_rom_extensions)) {
|
||||||
|
emu_type = CART_LOAD_EMU_TYPE_SNES;
|
||||||
} else if (file_has_extensions(path_get(path), emu_gameboy_rom_extensions)) {
|
} else if (file_has_extensions(path_get(path), emu_gameboy_rom_extensions)) {
|
||||||
emu_type = CART_LOAD_EMU_TYPE_GAMEBOY;
|
emu_type = CART_LOAD_EMU_TYPE_GAMEBOY;
|
||||||
} else if (file_has_extensions(path_get(path), emu_gameboy_color_rom_extensions)) {
|
} else if (file_has_extensions(path_get(path), emu_gameboy_color_rom_extensions)) {
|
||||||
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_rom_extensions)) {
|
|
||||||
// emu_type = CART_LOAD_EMU_TYPE_SEGA;
|
|
||||||
} else {
|
} else {
|
||||||
menu_show_error(menu, "Unsupported ROM");
|
menu_show_error(menu, "Unsupported ROM");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user