Skip to content

Commit

Permalink
Improve readme
Browse files Browse the repository at this point in the history
Remove 3 letter decode.
  • Loading branch information
networkfusion committed Aug 6, 2024
1 parent 8350883 commit e85ad50
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,15 @@ An open source menu for N64 flashcarts.
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:
To use boxart, place PNG files within the `sd:/menu/boxart/` folder.

They must use 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.

Each file must be named according to the 2 letter ROM ID.
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)
Expand All @@ -66,6 +67,10 @@ You can download these boxart packs:

[64DD Boxart](https://mega.nz/file/O3JzwD7B#BYl1aV-pbrJ-MxWUbM_K0yGVIRbmSoxJJZqQInRzZyM)

To improve the loading of the boxart images, and/or to ensure correct boxart images, these can be loaded by directories by each character of the full 4 character Game Code.
i.e. for GoldenEye NTSC USA (NGEE), this would be `sd:/menu/boxart/N/G/E/E/front.png`.
i.e. for GoldenEye PAL (NGEP), this would be `sd:/menu/boxart/N/G/E/P/front.png`.


### Menu Settings
The Menu creates a `config.ini` file in `sd:/menu/` which contains various settings that are used by the menu.
Expand Down
16 changes: 2 additions & 14 deletions src/menu/components/boxart.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,26 +69,14 @@ component_boxart_t *component_boxart_init (const char *storage_prefix, char *gam
path_pop(path);
path_pop(path);

sprintf(file_name, "%c%c%c.png", game_code[0], game_code[1], game_code[2]);
sprintf(file_name, "%c%c.png", 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, BOXART_HEIGHT, 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, BOXART_HEIGHT, png_decoder_callback, b) == PNG_OK) {
path_free(path);
return b;
}
}
}
}
// TODO: return default image.

Expand Down

0 comments on commit e85ad50

Please sign in to comment.