From 305a15d11427654075ff55ac2ed6fe28b68d9e03 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Mon, 2 Sep 2024 20:13:17 +0100 Subject: [PATCH 1/5] Update 00_getting_started_sd.md Fix missing backslash --- docs/00_getting_started_sd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/00_getting_started_sd.md b/docs/00_getting_started_sd.md index 4ee6e763..af937dfe 100644 --- a/docs/00_getting_started_sd.md +++ b/docs/00_getting_started_sd.md @@ -36,7 +36,7 @@ SD:\ │ │ ├── NDDJ2.n64 │ │ └── NDXJ0.n64 │ │ -│ └── emulators +│ └── emulators\ │ ├── neon64bu.rom │ ├── sodium64.z64 │ ├── gb.v64 From 2116f6e26b4f1a29ea52d68c097f9c159c2e49fe Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Mon, 16 Sep 2024 21:48:28 +0100 Subject: [PATCH 2/5] Add support for inputs from controller ports 2-4 (#141) Title sums it up ## Description Adds some extra logic in the controller polling to read from ports 2-4, letting those controllers input on the menu. ## Motivation and Context Port 1 no longer feels alone in the dark, cold world of menu selection. ## How Has This Been Tested? Same method I used for libdragon's error screen which had the same issue. Tested on a system with four controllers inserted. ## Screenshots ## Types of changes - [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: - [x] 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. Signed-off-by: FazanaJ --------- Co-authored-by: Robin Jones --- docs/00_getting_started_sd.md | 2 +- src/menu/actions.c | 22 +++++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/docs/00_getting_started_sd.md b/docs/00_getting_started_sd.md index 4ee6e763..af937dfe 100644 --- a/docs/00_getting_started_sd.md +++ b/docs/00_getting_started_sd.md @@ -36,7 +36,7 @@ SD:\ │ │ ├── NDDJ2.n64 │ │ └── NDXJ0.n64 │ │ -│ └── emulators +│ └── emulators\ │ ├── neon64bu.rom │ ├── sodium64.z64 │ ├── gb.v64 diff --git a/src/menu/actions.c b/src/menu/actions.c index 14c87fb6..9c44c23e 100644 --- a/src/menu/actions.c +++ b/src/menu/actions.c @@ -25,8 +25,17 @@ static void actions_clear (menu_t *menu) { } static void actions_update_direction (menu_t *menu) { - joypad_8way_t held_dir = joypad_get_direction(JOYPAD_PORT_1, JOYPAD_2D_DPAD | JOYPAD_2D_STICK); - joypad_8way_t fast_dir = joypad_get_direction(JOYPAD_PORT_1, JOYPAD_2D_C); + joypad_8way_t held_dir; + joypad_8way_t fast_dir; + + JOYPAD_PORT_FOREACH (i) { + held_dir = joypad_get_direction(i, JOYPAD_2D_DPAD | JOYPAD_2D_STICK); + fast_dir = joypad_get_direction(i, JOYPAD_2D_C); + if (held_dir != JOYPAD_8WAY_NONE || fast_dir != JOYPAD_8WAY_NONE) { + break; + } + } + if (fast_dir != JOYPAD_8WAY_NONE) { held_dir = fast_dir; @@ -82,7 +91,14 @@ static void actions_update_direction (menu_t *menu) { } static void actions_update_buttons (menu_t *menu) { - joypad_buttons_t pressed = joypad_get_buttons_pressed(JOYPAD_PORT_1); + joypad_buttons_t pressed; + + JOYPAD_PORT_FOREACH (i) { + pressed = joypad_get_buttons_pressed(i); + if (pressed.raw) { + break; + } + } if (pressed.a) { menu->actions.enter = true; From 10a8fcab9e2231b9fa2fb9e7bbd48bd4a96fe475 Mon Sep 17 00:00:00 2001 From: Mateusz Faderewski Date: Tue, 17 Sep 2024 00:11:51 +0200 Subject: [PATCH 3/5] libdragon update + reorganized menu init + bug fixes --- Makefile | 1 - libdragon | 2 +- src/menu/actions.c | 7 ++- src/menu/actions.h | 1 + src/menu/components/background.c | 13 ++--- src/menu/menu.c | 96 ++++++++++---------------------- 6 files changed, 42 insertions(+), 78 deletions(-) diff --git a/Makefile b/Makefile index ae6e6961..70255c60 100644 --- a/Makefile +++ b/Makefile @@ -98,7 +98,6 @@ $(SPNG_OBJS): N64_CFLAGS+=-isystem $(SOURCE_DIR)/libs/miniz -DSPNG_USE_MINIZ -fc $(FILESYSTEM_DIR)/FiraMonoBold.font64: MKFONT_FLAGS+=-c 1 --size 16 -r 20-7F -r 80-1FF -r 2026-2026 --ellipsis 2026,1 $(FILESYSTEM_DIR)/%.wav64: AUDIOCONV_FLAGS=--wav-compress 1 - $(@info $(shell mkdir -p ./$(FILESYSTEM_DIR) &> /dev/null)) $(FILESYSTEM_DIR)/%.font64: $(ASSETS_DIR)/%.ttf diff --git a/libdragon b/libdragon index e1eb9283..9dd99415 160000 --- a/libdragon +++ b/libdragon @@ -1 +1 @@ -Subproject commit e1eb9283e6feeb37a66797fa538ae7883d73227c +Subproject commit 9dd994151ae3f3709f1f80224e6b654aac8be6b4 diff --git a/src/menu/actions.c b/src/menu/actions.c index 9c44c23e..00317168 100644 --- a/src/menu/actions.c +++ b/src/menu/actions.c @@ -36,7 +36,6 @@ static void actions_update_direction (menu_t *menu) { } } - if (fast_dir != JOYPAD_8WAY_NONE) { held_dir = fast_dir; menu->actions.go_fast = true; @@ -114,6 +113,12 @@ static void actions_update_buttons (menu_t *menu) { } +void actions_init (void) { + JOYPAD_PORT_FOREACH (port) { + joypad_set_rumble_active(port, false); + } +} + void actions_update (menu_t *menu) { joypad_poll(); diff --git a/src/menu/actions.h b/src/menu/actions.h index f890b55c..e02e35af 100644 --- a/src/menu/actions.h +++ b/src/menu/actions.h @@ -11,6 +11,7 @@ #include "menu_state.h" +void actions_init (void); void actions_update (menu_t *menu); diff --git a/src/menu/components/background.c b/src/menu/components/background.c index 45119107..525fb0c8 100644 --- a/src/menu/components/background.c +++ b/src/menu/components/background.c @@ -98,9 +98,6 @@ static void prepare_background (component_background_t *c) { return; } - uint16_t image_center_x = (c->image->width / 2); - uint16_t image_center_y = (c->image->height / 2); - // Darken the image rdpq_attach(c->image, NULL); rdpq_mode_push(); @@ -108,15 +105,13 @@ static void prepare_background (component_background_t *c) { rdpq_set_prim_color(BACKGROUND_OVERLAY_COLOR); rdpq_mode_combiner(RDPQ_COMBINER_FLAT); rdpq_mode_blender(RDPQ_BLENDER_MULTIPLY); - rdpq_fill_rectangle( - 0 - (DISPLAY_CENTER_X - image_center_x), - 0 - (DISPLAY_CENTER_Y - image_center_y), - DISPLAY_WIDTH - (DISPLAY_CENTER_X - image_center_x), - DISPLAY_HEIGHT - (DISPLAY_CENTER_Y - image_center_y) - ); + rdpq_fill_rectangle(0, 0, c->image->width, c->image->height); rdpq_mode_pop(); rdpq_detach(); + uint16_t image_center_x = (c->image->width / 2); + uint16_t image_center_y = (c->image->height / 2); + // Prepare display list rspq_block_begin(); rdpq_mode_push(); diff --git a/src/menu/menu.c b/src/menu/menu.c index 479d9cfd..5e2b2168 100644 --- a/src/menu/menu.c +++ b/src/menu/menu.c @@ -27,37 +27,27 @@ #define MENU_CACHE_DIRECTORY "cache" #define BACKGROUND_CACHE_FILE "background.data" -#define FRAMERATE_DIVIDER (2) -#define LAG_REPORT (false) +#define INTERLACED (true) +#define FPS_LIMIT (30.0f) static menu_t *menu; -static tv_type_t tv_type; -static volatile int frame_counter = 0; -extern tv_type_t __boot_tvtype; +static void menu_init (boot_params_t *boot_params) { + menu = calloc(1, sizeof(menu_t)); + assert(menu != NULL); -static void frame_counter_handler (void) { - frame_counter += 1; -} + menu->boot_params = boot_params; + + menu->mode = MENU_MODE_NONE; + menu->next_mode = MENU_MODE_STARTUP; -static void frame_counter_reset (void) { -#if LAG_REPORT - static int accumulated = 0; - if (frame_counter > FRAMERATE_DIVIDER) { - accumulated += frame_counter - FRAMERATE_DIVIDER; - debugf( - "LAG: %d additional frame(s) displayed since last draw (accumulated: %d)\n", - frame_counter - FRAMERATE_DIVIDER, - accumulated - ); + menu->flashcart_err = flashcart_init(&menu->storage_prefix); + if (menu->flashcart_err != FLASHCART_OK) { + menu->next_mode = MENU_MODE_FAULT; } -#endif - frame_counter = 0; -} -static void menu_init (boot_params_t *boot_params) { joypad_init(); timer_init(); rtc_init(); @@ -65,22 +55,11 @@ static void menu_init (boot_params_t *boot_params) { rdpq_init(); dfs_init(DFS_DEFAULT_LOCATION); + actions_init(); sound_init_default(); + sound_init_sfx(); - JOYPAD_PORT_FOREACH (port) { - joypad_set_rumble_active(port, false); - } - - menu = calloc(1, sizeof(menu_t)); - assert(menu != NULL); - - menu->mode = MENU_MODE_NONE; - menu->next_mode = MENU_MODE_STARTUP; - - menu->flashcart_err = flashcart_init(&menu->storage_prefix); - if (menu->flashcart_err != FLASHCART_OK) { - menu->next_mode = MENU_MODE_FAULT; - } + hdmi_clear_game_id(); path_t *path = path_init(menu->storage_prefix, MENU_DIRECTORY); @@ -91,6 +70,15 @@ static void menu_init (boot_params_t *boot_params) { settings_load(&menu->settings); path_pop(path); + resolution_t resolution = { + .width = 640, + .height = 480, + .interlaced = INTERLACED ? INTERLACE_HALF : INTERLACE_OFF, + .pal60 = menu->settings.pal60_enabled, + }; + display_init(resolution, DEPTH_16_BPP, 2, GAMMA_NONE, INTERLACED ? FILTERS_DISABLED : FILTERS_RESAMPLE); + display_set_fps_limit(FPS_LIMIT); + path_push(path, MENU_CUSTOM_FONT_FILE); fonts_init(path_get(path)); path_pop(path); @@ -103,40 +91,20 @@ static void menu_init (boot_params_t *boot_params) { path_free(path); - menu->boot_params = boot_params; + sound_use_sfx(menu->settings.sound_enabled); menu->browser.directory = path_init(menu->storage_prefix, menu->settings.default_directory); if (!directory_exists(path_get(menu->browser.directory))) { path_free(menu->browser.directory); menu->browser.directory = path_init(menu->storage_prefix, "/"); } - - hdmi_clear_game_id(); - - tv_type = get_tv_type(); - if ((tv_type == TV_PAL) && menu->settings.pal60_enabled) { - // HACK: Set TV type to NTSC, so PAL console would output 60 Hz signal instead. - __boot_tvtype = TV_NTSC; - } - - sound_init_sfx(); - if (menu->settings.sound_enabled) { - sound_use_sfx(true); - } - - display_init(RESOLUTION_640x480, DEPTH_16_BPP, 2, GAMMA_NONE, FILTERS_DISABLED); - - register_VI_handler(frame_counter_handler); } static void menu_deinit (menu_t *menu) { - unregister_VI_handler(frame_counter_handler); - - // NOTE: Restore previous TV type so boot procedure wouldn't passthrough wrong value. - __boot_tvtype = tv_type; - hdmi_send_game_id(menu->boot_params); + component_background_free(); + path_free(menu->load.disk_path); path_free(menu->load.rom_path); for (int i = 0; i < menu->browser.entries; i++) { @@ -146,9 +114,7 @@ static void menu_deinit (menu_t *menu) { path_free(menu->browser.directory); free(menu); - component_background_free(); - - flashcart_deinit(); + display_close(); sound_deinit(); @@ -158,7 +124,7 @@ static void menu_deinit (menu_t *menu) { timer_close(); joypad_close(); - display_close(); + flashcart_deinit(); } typedef const struct { @@ -200,11 +166,9 @@ void menu_run (boot_params_t *boot_params) { menu_init(boot_params); while (true) { - surface_t *display = (frame_counter >= FRAMERATE_DIVIDER) ? display_try_get() : NULL; + surface_t *display = display_try_get(); if (display != NULL) { - frame_counter_reset(); - actions_update(menu); view_t *view = menu_get_view(menu->mode); From 269a8ae94d45e766a0bbe6cf97dddd77964754dd Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Sat, 28 Sep 2024 20:47:53 +0100 Subject: [PATCH 4/5] Optimize boxart image load (#130) ## Description Improves boxart image loading by using directory file paths. It also adds matching by full game ID's (for compatibility), but notes in the readme that it is slow. ## Motivation and Context Loading boxart was slow in certain circumstances. ## How Has This Been Tested? Locally on an SC64. ## Screenshots ## Types of changes - [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: - [ ] 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. Signed-off-by: GITHUB_USER ## Summary by CodeRabbit - **New Features** - Introduced a new image type enumeration for boxart components, enhancing image management. - Updated boxart initialization to allow for specific image views, improving flexibility in image retrieval. - Enhanced instructions for setting up boxart images with clearer directory structures and simplified naming conventions. - **Bug Fixes** - Improved the logic for loading boxart images, enabling better fallback options in case of missing files. --- README.md | 54 +++++++++++++++------ src/menu/components.h | 37 +++++++++++++- src/menu/components/boxart.c | 94 ++++++++++++++++++++++++++++++------ src/menu/views/load_disk.c | 2 +- src/menu/views/load_rom.c | 2 +- 5 files changed, 154 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 703804cc..26af0067 100644 --- a/README.md +++ b/README.md @@ -49,22 +49,44 @@ An open source menu for N64 flashcarts. ## Experimental features These features are subject to change: -### ROM Boxart -To use boxart, place PNG files in the `/menu/boxart` folder on the SD card with the following dimensions: -* Standard covers: 158x112 -* 64DD covers: 129x112 -* Japanese covers: 112x158 - -Each file must be named according to the 2 letter ROM ID, or 3 letter ROM ID including media type. -i.e. for GoldenEye 2 letters, this would be `GE.png`. -i.e. for GoldenEye 3 letters, this would be `NGE.png`. -You can download these boxart packs: - -[American Boxart](https://mega.nz/file/6cNGwSqI#8X5ukb65n3YMlGaUtSOGXkKo9HxVnnMOgqn94Epcr7w) - -[European Boxart](https://mega.nz/file/O7AjDbRJ#VnVU10dq8HQvBUQptppI6PAcQMb8-Zembqav8WtAQ_M) - -[64DD Boxart](https://mega.nz/file/O3JzwD7B#BYl1aV-pbrJ-MxWUbM_K0yGVIRbmSoxJJZqQInRzZyM) + +### GamePak sprites +To use N64 `GamePak` sprites, place `PNG` files within the `sd:/menu/boxart/` folder. + + +#### Supported sprites +These must be `PNG` files that use the following dimensions: +* Standard N64 GamePak boxart sprites: 158x112 +* Japanese N64 GamePak boxart sprites: 112x158 +* 64DD boxart sprites: 129x112 + +They will be loaded by directories using each character of the full 4 character Game Code (as identified in the menus ROM information). +i.e. for GoldenEye NTSC USA (NGEE), this would be `sd:/menu/boxart/N/G/E/E/boxart_front.png`. +i.e. for GoldenEye PAL (NGEP), this would be `sd:/menu/boxart/N/G/E/P/boxart_front.png`. + +To improve compatibility between regions (as a fallback), you may exclude the region ID (last matched directory) for GamePaks to match with 3 letter IDs instead: +i.e. for GoldenEye, this would be `sd:/menu/boxart/N/G/E/boxart_front.png`. + +**Note1:** Excluding the region ID may show the wrong boxart. +**Note2:** For future support, boxart sprites should also include: `boxart_back.png`, `boxart_top.png`, `boxart_bottom.png`, `boxart_left.png`, `boxart_right.png`. + + +#### Compatibilty mode +If you cannot yet satisfy the correct boxart layout, The menu still has **deprecated** support for filenames containing the Game ID. + +**Note:** This will add a noticeable delay for displaying parts of the menu. + +Each file must be named according to the 2,3 or 4 letter GamePak ID (matched in this order). +i.e. +* for GoldenEye 4 letters, this would be `sd:/menu/boxart/NGEE.png` and/or `sd:/menu/boxart/NGEP.png`. +* for GoldenEye 3 letters, this would be `sd:/menu/boxart/NGE.png`. +* for GoldenEye 2 letters, this would be `sd:/menu/boxart/GE.png`. + + +As a starting point, here are some links to boxart packs: +* [American GamePak Boxart](https://mega.nz/file/6cNGwSqI#8X5ukb65n3YMlGaUtSOGXkKo9HxVnnMOgqn94Epcr7w) +* [European GamePak Boxart](https://mega.nz/file/O7AjDbRJ#VnVU10dq8HQvBUQptppI6PAcQMb8-Zembqav8WtAQ_M) +* [64DD Boxart](https://mega.nz/file/O3JzwD7B#BYl1aV-pbrJ-MxWUbM_K0yGVIRbmSoxJJZqQInRzZyM) ### Menu Settings diff --git a/src/menu/components.h b/src/menu/components.h index 4925ee5b..67fde2d3 100644 --- a/src/menu/components.h +++ b/src/menu/components.h @@ -11,6 +11,41 @@ #include #include "menu_state.h" +/** @brief File image Enumeration. */ +typedef enum { + + /** @brief Boxart image from the front */ + IMAGE_BOXART_FRONT, + + /** @brief Boxart image from the back */ + IMAGE_BOXART_BACK, + + /** @brief Boxart image from the top */ + IMAGE_BOXART_TOP, + + /** @brief Boxart image from the bottom */ + IMAGE_BOXART_BOTTOM, + + /** @brief Boxart image from the left side */ + IMAGE_BOXART_LEFT, + + /** @brief Boxart image from the right side */ + IMAGE_BOXART_RIGHT, + + /** @brief GamePak image from the front */ + IMAGE_GAMEPAK_FRONT, + + /** @brief GamePak image from the back */ + IMAGE_GAMEPAK_BACK, + + /** @brief File image thumbnail */ + IMAGE_THUMBNAIL, + + /** @brief List end marker */ + IMAGE_TYPE_END + +} file_image_type_t; + /** * @addtogroup @@ -64,7 +99,7 @@ typedef struct { surface_t *image; } component_boxart_t; -component_boxart_t *component_boxart_init (const char *storage_prefix, char *game_code); +component_boxart_t *component_boxart_init (const char *storage_prefix, char *game_code, file_image_type_t current_image_view); void component_boxart_free (component_boxart_t *b); void component_boxart_draw (component_boxart_t *b); diff --git a/src/menu/components/boxart.c b/src/menu/components/boxart.c index f50294ee..2535068c 100644 --- a/src/menu/components/boxart.c +++ b/src/menu/components/boxart.c @@ -17,9 +17,9 @@ static void png_decoder_callback (png_err_t err, surface_t *decoded_image, void } -component_boxart_t *component_boxart_init (const char *storage_prefix, char *game_code) { +component_boxart_t *component_boxart_init (const char *storage_prefix, char *game_code, file_image_type_t current_image_view) { component_boxart_t *b; - char file_name[8]; + char boxart_id_path[8]; if ((b = calloc(1, sizeof(component_boxart_t))) == NULL) { return NULL; @@ -29,21 +29,83 @@ component_boxart_t *component_boxart_init (const char *storage_prefix, char *gam path_t *path = path_init(storage_prefix, BOXART_DIRECTORY); - sprintf(file_name, "%.3s.png", game_code); - path_push(path, file_name); - if (png_decoder_start(path_get(path), BOXART_WIDTH_MAX, BOXART_HEIGHT_MAX, png_decoder_callback, b) == PNG_OK) { - path_free(path); - return b; + sprintf(boxart_id_path, "%c/%c/%c/%c", game_code[0], game_code[1], game_code[2], game_code[3]); + path_push(path, boxart_id_path); + + if (!directory_exists(path_get(path))) { // Allow boxart to not specify the region code. + path_pop(path); + } + + if (directory_exists(path_get(path))) { + switch (current_image_view) { + case IMAGE_GAMEPAK_FRONT: + path_push(path, "gamepak_front.png"); + case IMAGE_GAMEPAK_BACK: + path_push(path, "gamepak_back.png"); + case IMAGE_BOXART_BACK: + path_push(path, "boxart_back.png"); + case IMAGE_BOXART_LEFT: + path_push(path, "boxart_left.png"); + case IMAGE_BOXART_RIGHT: + path_push(path, "boxart_right.png"); + case IMAGE_BOXART_BOTTOM: + path_push(path, "boxart_bottom.png"); + case IMAGE_BOXART_TOP: + path_push(path, "boxart_top.png"); + default: + path_push(path, "boxart_front.png"); + } + + if (file_exists(path_get(path))) { + if (png_decoder_start(path_get(path), BOXART_WIDTH_MAX, BOXART_HEIGHT_MAX, png_decoder_callback, b) == PNG_OK) { + path_free(path); + return b; + } + } } - path_pop(path); - - // TODO: This is bad, we should only check for 3 letter codes - sprintf(file_name, "%.2s.png", game_code + 1); - path_push(path, file_name); - if (png_decoder_start(path_get(path), BOXART_WIDTH_MAX, BOXART_HEIGHT_MAX, png_decoder_callback, b) == PNG_OK) { - path_free(path); - return b; + else { // compatibility mode + + char file_name[8]; + + // reset the directory path used for boxart. + path = path_init(storage_prefix, BOXART_DIRECTORY); + + sprintf(file_name, "%c%c%c%c.png", game_code[0], game_code[1], game_code[2], game_code[3]); + path_push(path, file_name); + + if (file_exists(path_get(path))) { + if (png_decoder_start(path_get(path), BOXART_WIDTH_MAX, BOXART_HEIGHT_MAX, png_decoder_callback, b) == PNG_OK) { + path_free(path); + return b; + } + } + + path_pop(path); + sprintf(file_name, "%c%c%c.png", game_code[0], game_code[1], game_code[2]); + path_push(path, file_name); + + if (file_exists(path_get(path))) { + if (file_exists(path_get(path))) { + if (png_decoder_start(path_get(path), BOXART_WIDTH_MAX, BOXART_HEIGHT_MAX, png_decoder_callback, b) == PNG_OK) { + path_free(path); + return b; + } + } + } + else { + path_pop(path); + + sprintf(file_name, "%c%c.png", game_code[1], game_code[2]); + path_push(path, file_name); + if (file_exists(path_get(path))) { + if (png_decoder_start(path_get(path), BOXART_WIDTH_MAX, BOXART_HEIGHT_MAX, png_decoder_callback, b) == PNG_OK) { + path_free(path); + return b; + } + } + } } + // TODO: return default image. path_free(path); free(b); @@ -89,4 +151,4 @@ void component_boxart_draw (component_boxart_t *b) { BOXART_LOADING_COLOR ); } -} \ No newline at end of file +} diff --git a/src/menu/views/load_disk.c b/src/menu/views/load_disk.c index 0165bdc9..39957fcf 100644 --- a/src/menu/views/load_disk.c +++ b/src/menu/views/load_disk.c @@ -170,7 +170,7 @@ void view_load_disk_init (menu_t *menu) { menu_show_error(menu, convert_error_message(err)); } - boxart = component_boxart_init(menu->storage_prefix, menu->load.disk_info.id); + boxart = component_boxart_init(menu->storage_prefix, menu->load.disk_info.id, IMAGE_BOXART_FRONT); } void view_load_disk_display (menu_t *menu, surface_t *display) { diff --git a/src/menu/views/load_rom.c b/src/menu/views/load_rom.c index c408b47c..36933b92 100644 --- a/src/menu/views/load_rom.c +++ b/src/menu/views/load_rom.c @@ -355,7 +355,7 @@ void view_load_rom_init (menu_t *menu) { return; } - boxart = component_boxart_init(menu->storage_prefix, menu->load.rom_info.game_code); + boxart = component_boxart_init(menu->storage_prefix, menu->load.rom_info.game_code, IMAGE_BOXART_FRONT); component_context_menu_init(&options_context_menu); } From 55e7663baea4b43293b258a93c07c74950129baf Mon Sep 17 00:00:00 2001 From: Suprapote <111246491+Suprapote@users.noreply.github.com> Date: Sat, 28 Sep 2024 21:57:45 +0200 Subject: [PATCH 5/5] New boxart links (#135) ## Description Improve the gamepak boxart links with better sprite matching. ## Motivation and Context Games were not always matched correctly. Works towards a boxart pack for every region of every game. ## How Has This Been Tested? ## Screenshots ## Types of changes - [ ] Improvement (non-breaking change that adds a new feature) - [ ] Bug fix (fixes an issue) - [ ] Breaking change (breaking change) - [x] Documentation Improvement - [ ] Config and build (change in the configuration and build system, has no impact on code or features) ## Checklist: - [ ] 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. Signed-off-by: GITHUB_USER --------- Co-authored-by: Robin Jones --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 26af0067..de3d030c 100644 --- a/README.md +++ b/README.md @@ -84,9 +84,10 @@ i.e. As a starting point, here are some links to boxart packs: -* [American GamePak Boxart](https://mega.nz/file/6cNGwSqI#8X5ukb65n3YMlGaUtSOGXkKo9HxVnnMOgqn94Epcr7w) -* [European GamePak Boxart](https://mega.nz/file/O7AjDbRJ#VnVU10dq8HQvBUQptppI6PAcQMb8-Zembqav8WtAQ_M) -* [64DD Boxart](https://mega.nz/file/O3JzwD7B#BYl1aV-pbrJ-MxWUbM_K0yGVIRbmSoxJJZqQInRzZyM) +* [Japan Boxart](https://mega.nz/file/KyJR0B6B#ERabLautAVPaqJTIdBSv4ghbudNhK7hnEr2ZS1Q6ub0) +* [American Boxart](https://mega.nz/file/rugAFYSQ#JHfgCU2amzNVpC4S6enP3vg--wtAAwsziKa7cej6QCc) +* [European Boxart](https://mega.nz/file/OmIV3aAK#kOWdutK1_41ffN64R6thbU7HEPR_M9qO0YM2mNG6RbQ) +* [64DD Boxart](https://mega.nz/file/ay5wQIxJ#k3PF-VMLrZJxJTr-BOaOKa2TBIK7c2t4zwbdshsQl40) ### Menu Settings