Skip to content

Commit

Permalink
Merge branch 'develop' into improve-rom-info
Browse files Browse the repository at this point in the history
  • Loading branch information
networkfusion authored Dec 24, 2024
2 parents a5ffb3c + 312b19e commit 4b24ccc
Show file tree
Hide file tree
Showing 26 changed files with 40 additions and 50 deletions.
28 changes: 2 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,30 +85,6 @@ SOUNDS = \
error.wav \
settings.wav

JOYPAD_IMAGES = \
joypad_a.png \
joypad_b.png \
joypad_c_down.png \
joypad_c_left.png \
joypad_c_right.png \
joypad_c_up.png \
joypad_d_down.png \
joypad_d_left.png \
joypad_d_right.png \
joypad_d_up.png \
joypad_l.png \
joypad_r.png \
joypad_start.png \
joypad_z.png
# joypad_j_east.png \
# joypad_j_north.png \
# joypad_j_northeast.png \
# joypad_j_northwest.png \
# joypad_j_south.png \
# joypad_j_southeast.png \
# joypad_j_southwest.png \
# joypad_j_west.png \
OBJS = $(addprefix $(BUILD_DIR)/, $(addsuffix .o,$(basename $(SRCS))))
MINIZ_OBJS = $(filter $(BUILD_DIR)/libs/miniz/%.o,$(OBJS))
SPNG_OBJS = $(filter $(BUILD_DIR)/libs/libspng/%.o,$(OBJS))
Expand All @@ -117,7 +93,7 @@ DEPS = $(OBJS:.o=.d)
FILESYSTEM = \
$(addprefix $(FILESYSTEM_DIR)/, $(notdir $(FONTS:%.ttf=%.font64))) \
$(addprefix $(FILESYSTEM_DIR)/, $(notdir $(SOUNDS:%.wav=%.wav64))) \
$(addprefix $(FILESYSTEM_DIR)/, $(notdir $(JOYPAD_IMAGES:%.png=%.sprite)))
$(addprefix $(FILESYSTEM_DIR)/, $(notdir $(IMAGES:%.png=%.sprite)))

$(MINIZ_OBJS): N64_CFLAGS+=-DMINIZ_NO_TIME -fcompare-debug-second
$(SPNG_OBJS): N64_CFLAGS+=-isystem $(SOURCE_DIR)/libs/miniz -DSPNG_USE_MINIZ -fcompare-debug-second
Expand All @@ -134,7 +110,7 @@ $(FILESYSTEM_DIR)/%.wav64: $(ASSETS_DIR)/sounds/%.wav
@echo " [AUDIO] $@"
@$(N64_AUDIOCONV) $(AUDIOCONV_FLAGS) -o $(FILESYSTEM_DIR) "$<"

$(FILESYSTEM_DIR)/%.sprite: $(ASSETS_DIR)/images/joypad/%.png
$(FILESYSTEM_DIR)/%.sprite: $(ASSETS_DIR)/images/%.png
@echo " [SPRITE] $@"
@$(N64_MKSPRITE) $(MKSPRITE_FLAGS) -o $(dir $@) "$<"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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, SMS, GG) ROMs.
* Emulator support (NES, SNES, GB, GBC, SMS, GG, CHF) ROMs.
* N64 ROM box image support.
* Background image (PNG) support.
* Comprehensive ROM save database (including HomeBrew headers).
Expand Down
Binary file removed assets/images/joypad/joypad_a.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_b.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_c_down.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_c_left.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_c_right.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_c_up.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_d_down.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_d_left.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_d_right.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_d_up.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_l.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_r.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_start.png
Binary file not shown.
Binary file removed assets/images/joypad/joypad_z.png
Binary file not shown.
4 changes: 3 additions & 1 deletion docs/00_getting_started_sd.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
- **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`
- **Fairchild Channel F**: [Press-F-Ultra](https://github.com/celerizer/Press-F-Ultra/releases) by *celerizer* - `Press-F.z64`


### 64DD disk support
Expand Down Expand Up @@ -50,7 +51,8 @@ SD:\
│ ├── sodium64.z64
│ ├── gb.v64
│ ├── gbc.v64
│ └── smsPlus64.z64
│ ├── smsPlus64.z64
│ └── Press-F.z64
├── (a rom).z64
├── (a rom).n64
Expand Down
2 changes: 1 addition & 1 deletion libdragon
Submodule libdragon updated 71 files
+7 −3 Makefile
+1 −1 boot/Makefile
+92 −0 boot/cleanup.c
+1 −2 boot/ipl3_compat.ld
+1 −0 boot/ipl3_dev.ld
+1 −2 boot/ipl3_prod.ld
+1 −64 boot/loader.c
+1 −29 boot/loader_compat.c
+1 −1 dso.ld
+1 −0 examples/Makefile
+1 −0 examples/dfsdemo/Makefile
+1 −0 examples/dfsdemo/filesystem/a_directory/a_file.txt
+43 −30 examples/videoplayer/videoplayer.c
+25 −0 examples/vifx/Makefile
+ examples/vifx/assets/philips.rgba32.png
+73 −0 examples/vifx/vifx.c
+59 −18 include/display.h
+255 −0 include/eia608.h
+530 −0 include/fgeom.h
+46 −0 include/fmath.h
+17 −0 include/graphics.h
+3 −0 include/libdragon.h
+119 −3 include/mpeg2.h
+7 −4 include/n64sys.h
+2 −0 include/rdpq_font.h
+5 −3 include/rdpq_mode.h
+6 −0 include/rsp.h
+2 −0 include/rsp.inc
+889 −0 include/vi.h
+1 −1 include/yuv.h
+3 −1 n64.ld
+18 −6 n64.mk
+5 −0 rsp.ld
+10 −10 src/GL/array.c
+8 −8 src/GL/buffer.c
+93 −93 src/GL/cpu_pipeline.c
+40 −38 src/GL/gl.c
+4 −4 src/GL/gl_internal.h
+35 −35 src/GL/lighting.c
+19 −19 src/GL/list.c
+41 −41 src/GL/matrix.c
+35 −35 src/GL/pixelrect.c
+143 −143 src/GL/primitive.c
+46 −46 src/GL/query.c
+10 −10 src/GL/rendermode.c
+30 −30 src/GL/rsp_pipeline.c
+34 −34 src/GL/texture.c
+7 −1 src/asset.c
+23 −21 src/display.c
+6 −6 src/dlfcn.c
+619 −0 src/eia608.c
+323 −0 src/math/fgeom.c
+14 −0 src/math/fmath.c
+3 −7 src/n64sys.c
+12 −7 src/rdpq/rdpq_font.c
+2 −0 src/rdpq/rdpq_font_internal.h
+3 −2 src/rdpq/rdpq_paragraph.c
+9 −4 src/usb.c
+4 −0 src/utils.h
+743 −0 src/vi.c
+0 −400 src/vi.h
+394 −0 src/vi_internal.h
+1 −0 src/video/mpeg2.c
+12 −9 src/video/yuv.c
+14 −0 tests/test_constructors.c
+43 −0 tests/test_math.c
+3 −0 tests/testrom.c
+2 −2 tools/dumpdfs/dumpdfs.c
+1 −1 tools/mkdfs/mkdfs.c
+3 −1 tools/mkfont/mkfont_out.cpp
+55 −5 tools/n64dso/n64dso-extern.c
2 changes: 1 addition & 1 deletion src/libs/miniz
4 changes: 4 additions & 0 deletions src/menu/cart_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
save_type = FLASHCART_SAVE_TYPE_NONE;
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))) {
Expand Down
2 changes: 2 additions & 0 deletions src/menu/cart_load.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ typedef enum {
CART_LOAD_EMU_TYPE_GAMEBOY_COLOR,
/** @brief The ROM is designed for a Sega 8Bit system (Game Gear or Master System). */
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;


Expand Down
2 changes: 1 addition & 1 deletion src/menu/views/browser.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

static const char *rom_extensions[] = { "z64", "n64", "v64", "rom", 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.
static const char *save_extensions[] = { "sav", NULL };
static const char *image_extensions[] = { "png", NULL };
Expand Down
2 changes: 1 addition & 1 deletion src/menu/views/file_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *music_extensions[] = { "mp3", "wav", "ogg", "wma", "flac", 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;
Expand Down
2 changes: 1 addition & 1 deletion src/menu/views/flashcart_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static void draw (menu_t *menu, surface_t *d) {
" Automatic CIC: %s.\n"
" Region Detection: %s.\n"
" Save Writeback: %s.\n"
" Update from menu: %s.\n"
" Auto F/W Updates: %s.\n"
"\n\n",
format_cart_type(),
"Not Available", // TODO get cart firmware version(s).
Expand Down
5 changes: 5 additions & 0 deletions src/menu/views/load_emulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_color_rom_extensions[] = { "gbc", 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;

Expand All @@ -25,6 +26,8 @@ static char *format_emulator_name (cart_load_emu_type_t emulator_info) {
return "Nintendo GAMEBOY Color";
case CART_LOAD_EMU_TYPE_SEGA_GENERIC_8BIT:
return "SEGA 8bit system";
case CART_LOAD_EMU_TYPE_FAIRCHILD_CHANNELF:
return "Fairchild Channel F";
default:
return "Unknown";
}
Expand Down Expand Up @@ -120,6 +123,8 @@ void view_load_emulator_init (menu_t *menu) {
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 if (file_has_extensions(path_get(path), emu_fairchild_channelf_rom_extensions)) {
emu_type = CART_LOAD_EMU_TYPE_FAIRCHILD_CHANNELF;
} else {
menu_show_error(menu, "Unsupported ROM");
}
Expand Down
35 changes: 18 additions & 17 deletions src/menu/views/settings_editor.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ static const char *format_switch (bool state) {
}
}

static void set_pal60_type (menu_t *menu, void *arg) {
menu->settings.pal60_enabled = (bool)(uintptr_t)(arg);
settings_save(&menu->settings);
}

static void set_protected_entries_type (menu_t *menu, void *arg) {
menu->settings.show_protected_entries = (bool)(uintptr_t)(arg);
settings_save(&menu->settings);
Expand All @@ -35,6 +30,11 @@ static void set_sound_enabled_type (menu_t *menu, void *arg) {
}

#ifdef BETA_SETTINGS
static void set_pal60_type (menu_t *menu, void *arg) {
menu->settings.pal60_enabled = (bool)(uintptr_t)(arg);
settings_save(&menu->settings);
}

static void set_bgm_enabled_type (menu_t *menu, void *arg) {
menu->settings.bgm_enabled = (bool)(uintptr_t)(arg);
settings_save(&menu->settings);
Expand All @@ -52,12 +52,6 @@ static void set_rumble_enabled_type (menu_t *menu, void *arg) {
#endif


static component_context_menu_t set_pal60_type_context_menu = { .list = {
{.text = "On", .action = set_pal60_type, .arg = (void *)(uintptr_t)(true) },
{.text = "Off", .action = set_pal60_type, .arg = (void *) (false) },
COMPONENT_CONTEXT_MENU_LIST_END,
}};

static component_context_menu_t set_protected_entries_type_context_menu = { .list = {
{.text = "On", .action = set_protected_entries_type, .arg = (void *)(uintptr_t)(true) },
{.text = "Off", .action = set_protected_entries_type, .arg = (void *)(uintptr_t)(false) },
Expand All @@ -77,6 +71,12 @@ static component_context_menu_t set_use_saves_folder_type_context_menu = { .list
}};

#ifdef BETA_SETTINGS
static component_context_menu_t set_pal60_type_context_menu = { .list = {
{.text = "On", .action = set_pal60_type, .arg = (void *)(uintptr_t)(true) },
{.text = "Off", .action = set_pal60_type, .arg = (void *) (false) },
COMPONENT_CONTEXT_MENU_LIST_END,
}};

static component_context_menu_t set_bgm_enabled_type_context_menu = { .list = {
{.text = "On", .action = set_bgm_enabled_type, .arg = (void *)(uintptr_t)(true) },
{.text = "Off", .action = set_bgm_enabled_type, .arg = (void *)(uintptr_t)(false) },
Expand All @@ -91,11 +91,11 @@ static component_context_menu_t set_rumble_enabled_type_context_menu = { .list =
#endif

static component_context_menu_t options_context_menu = { .list = {
{ .text = "PAL60 Mode", .submenu = &set_pal60_type_context_menu },
{ .text = "Show Hidden Files", .submenu = &set_protected_entries_type_context_menu },
{ .text = "Sound Effects", .submenu = &set_sound_enabled_type_context_menu },
{ .text = "Use Saves Folder", .submenu = &set_use_saves_folder_type_context_menu },
#ifdef BETA_SETTINGS
{ .text = "PAL60 Mode", .submenu = &set_pal60_type_context_menu },
{ .text = "Background Music", .submenu = &set_bgm_enabled_type_context_menu },
{ .text = "Rumble Feedback", .submenu = &set_rumble_enabled_type_context_menu },
// { .text = "Restore Defaults", .action = set_use_default_settings },
Expand Down Expand Up @@ -136,27 +136,28 @@ static void draw (menu_t *menu, surface_t *d) {
ALIGN_LEFT, VALIGN_TOP,
"\n\n"
" Default Directory : %s\n\n"
" Autoload ROM : %s\n"
" Autoload ROM : %s\n\n"
"To change the following menu settings, press 'A':\n"
"* PAL60 Mode : %s\n"
" Show Hidden Files : %s\n"
" Use Saves folder : %s\n"
" Sound Effects : %s\n"
#ifdef BETA_SETTINGS
"* PAL60 Mode : %s\n"
" Background Music : %s\n"
" Rumble Feedback : %s\n"
#endif
"\n\n"
"Note: Certain settings have the following caveats:\n"
"* Requires rebooting the N64 Console.\n",
"* Requires rebooting the N64 Console.\n"
#endif
,
menu->settings.default_directory,
format_switch(menu->settings.rom_autoload_enabled),
format_switch(menu->settings.pal60_enabled),
format_switch(menu->settings.show_protected_entries),
format_switch(menu->settings.use_saves_folder),
format_switch(menu->settings.sound_enabled)
#ifdef BETA_SETTINGS
,
format_switch(menu->settings.pal60_enabled),
format_switch(menu->settings.bgm_enabled),
format_switch(menu->settings.rumble_enabled)
#endif
Expand Down

0 comments on commit 4b24ccc

Please sign in to comment.