Skip to content

Commit f08e900

Browse files
Merge branch 'develop' into improve-rom-info
2 parents 4b24ccc + f2cff4c commit f08e900

File tree

22 files changed

+117
-49
lines changed

22 files changed

+117
-49
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM debian:bookworm-slim
22

3-
ARG SC64_DEPLOYER_VERSION=v2.20.0
3+
ARG SC64_DEPLOYER_VERSION=v2.20.2
44
RUN apt-get update && \
55
apt-get upgrade -y && \
66
apt-get install build-essential doxygen git python3 wget -y && \

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ FILESYSTEM = \
9797

9898
$(MINIZ_OBJS): N64_CFLAGS+=-DMINIZ_NO_TIME -fcompare-debug-second
9999
$(SPNG_OBJS): N64_CFLAGS+=-isystem $(SOURCE_DIR)/libs/miniz -DSPNG_USE_MINIZ -fcompare-debug-second
100-
$(FILESYSTEM_DIR)/FiraMonoBold.font64: MKFONT_FLAGS+=-c 1 --size 16 -r 20-7F -r 80-1FF -r 2026-2026 --ellipsis 2026,1
100+
$(FILESYSTEM_DIR)/FiraMonoBold.font64: MKFONT_FLAGS+=--compress 1 --outline 1 --size 16 --range 20-7F --range 80-1FF --range 2026-2026 --ellipsis 2026,1
101101
$(FILESYSTEM_DIR)/%.wav64: AUDIOCONV_FLAGS=--wav-compress 1
102102

103103
$(@info $(shell mkdir -p ./$(FILESYSTEM_DIR) &> /dev/null))

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ An open source menu for N64 flashcarts.
3232
## Documentation
3333
* [Getting started guide](./docs/00_getting_started_sd.md)
3434
* [Menu controls](./docs/01_menu_controls.md)
35-
* [Menu customizations](./docs/07_menu_customizations.md)
35+
* [Menu customization](./docs/07_menu_customization.md)
3636
* [Developer guide](./docs/99_developer_guide.md)
3737

3838
## Video showcase (as of Oct 12 2023)
@@ -53,27 +53,36 @@ These features are subject to change:
5353

5454
### N64 ROM autoload
5555
To use the autoload function, while on the `N64 ROM information` display, press the `R` button on your joypad and select the `Set ROM to autoload` option. When you restart the console, it will now only load the selected ROM rather than the menu.
56-
NOTE: to return to the menu, hold joypad `start` button whilst powering on the console.
56+
The autoload setting is stored in `config.ini` and persists until changed. This feature may slightly increase boot time as the menu needs to check for the Start button state.
57+
NOTE: To return to the menu, hold the joypad `Start` button while powering on the console.
5758

5859
### GamePak sprites
59-
To use N64 `GamePak` sprites, place `PNG` files within the `sd:/menu/boxart/` folder.
60-
60+
To use N64 GamePak sprites, place PNG files within the `sd:/menu/boxart/` folder.
6161

6262
#### Supported sprites
6363
These must be `PNG` files that use the following dimensions:
6464
* Standard N64 GamePak boxart sprites: 158x112
6565
* Japanese N64 GamePak boxart sprites: 112x158
6666
* 64DD boxart sprites: 129x112
6767

68+
Supported PNG formats:
69+
* RGB/RGBA color formats
70+
* 8-bit color depth
71+
6872
They will be loaded by directories using each character (case-sensitive) of the full 4 character Game Code (as identified in the menu ROM information).
6973
i.e. for GoldenEye NTSC USA (NGEE), this would be `sd:/menu/boxart/N/G/E/E/boxart_front.png`.
7074
i.e. for GoldenEye PAL (NGEP), this would be `sd:/menu/boxart/N/G/E/P/boxart_front.png`.
7175

7276
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:
7377
i.e. for GoldenEye, this would be `sd:/menu/boxart/N/G/E/boxart_front.png`.
7478

75-
**Note1:** Excluding the region ID may show the wrong boxart.
76-
**Note2:** For future support, boxart sprites should also include: `boxart_back.png`, `boxart_top.png`, `boxart_bottom.png`, `boxart_left.png`, `boxart_right.png`.
79+
**Warning**: Excluding the region ID may show the wrong boxart.
80+
**Note**: For future support, boxart sprites should also include:
81+
* `boxart_back.png`
82+
* `boxart_top.png`
83+
* `boxart_bottom.png`
84+
* `boxart_left.png`
85+
* `boxart_right.png`
7786

7887
As a starting point, here is a link to a boxart pack following the new structure, including `boxart_front.png` and failback images:
7988
* [Link](https://drive.google.com/file/d/1IpCmFqmGgGwKKmlRBxYObfFR9XywaC6n/view?usp=drive_link)
@@ -117,14 +126,14 @@ If required, you can manually adjust the file on the SD card using your computer
117126

118127
### ED64 - WIP - UNTESTED AND UNSUPPORTED - USE AT OWN RISK
119128
Currently not supported, but work is in progress (See [PR's](https://github.com/Polprzewodnikowy/N64FlashcartMenu/pulls)).
120-
NOTE: The menu may be able to load ROM's but not perform saves and may break existing ones..
129+
**Warning**: The menu may be able to load ROMs but cannot guarantee save functionality. Existing saves may be corrupted.
121130

122131
#### ED64 (Vseries)
123132
The aim is to reach feature parity with [ED64-UnofficialOS](https://github.com/n64-tools/ED64-UnofficialOS-binaries) / [ED64-OfficialOS](https://krikzz.com/pub/support/everdrive-64/v2x-v3x/os-bin/).
124133
Download the `OS64.v64` ROM from the latest [action run - assets] and place it in the `/ED64` folder.
125134

126135
#### ED64 (X series)
127-
X Series support is currently awaiting fixes, in the meantime use the official [OS](https://krikzz.com/pub/support/everdrive-64/x-series/OS/) instead.
136+
X Series support is currently awaiting fixes. Please use the official [OS](https://krikzz.com/pub/support/everdrive-64/x-series/OS/) for now.
128137

129138
#### ED64 (P clone)
130139
Download the `OS64P.v64` ROM from the latest [action run - assets] and place it in the `/ED64P` folder.

docs/00_getting_started_sd.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
## First time setup of SD card
22

3-
Using your PC, insert the SD card and ensure it is formatted for compatibility with your flashcart
3+
### Flashcarts
4+
Using your PC, insert the SD card and ensure it is formatted for compatibility with your flashcart.
5+
**warning** Filenames are expected to be part of the ASCII character set. Unicode characters are not fully supported and may cause a crash screen.
6+
47
#### SC64
58
- FAT32 and EXFAT are fully supported.
69
- An SD formatted with 128 kiB cluster size is recommended.

docs/01_menu_controls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Use the C-Up and C-Down buttons
77
### DD ROMs
88

99
#### Expansion Disks
10-
To load an expansion disk (e.g. F-Zero X) browse to the N64 ROM and load it (but not start it) and then browse to the DD expansion file and press the `R` button.
10+
To load an expansion disk (e.g. F-Zero X) browse to the N64 ROM and load it (but not start it) and then browse to the DD expansion file and press the `L` or `Z` button.
1111

1212
#### Disk swapping
1313
This feature is not currently available in the menu.

src/flashcart/64drive/64drive.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,31 @@ static bool d64_has_feature (flashcart_features_t feature) {
8282
}
8383
}
8484

85+
/**
86+
* @brief Retrieves the firmware version of the 64drive device.
87+
*
88+
* The firmware version is returned as a flashcart_firmware_version_t structure, with each field
89+
* including the major, minor, and revision numbers.
90+
* The major version is set to 1 for 64drive variant A, and 2 for 64drive variant B.
91+
*
92+
* @return A flashcart_firmware_version_t structure containing the firmware version information.
93+
*/
94+
static flashcart_firmware_version_t d64_get_firmware_version (void) {
95+
flashcart_firmware_version_t version_info;
96+
97+
d64_ll_get_version(&device_variant, &version_info.minor, &version_info.revision);
98+
99+
if (device_variant == DEVICE_VARIANT_A) {
100+
version_info.major = 1;
101+
} else if (device_variant == DEVICE_VARIANT_B) {
102+
version_info.major = 2;
103+
} else {
104+
version_info.major = 0;
105+
}
106+
107+
return version_info;
108+
}
109+
85110
static flashcart_err_t d64_load_rom (char *rom_path, flashcart_progress_callback_t *progress) {
86111
FIL fil;
87112
UINT br;
@@ -277,6 +302,7 @@ static flashcart_t flashcart_d64 = {
277302
.init = d64_init,
278303
.deinit = d64_deinit,
279304
.has_feature = d64_has_feature,
305+
.get_firmware_version = d64_get_firmware_version,
280306
.load_rom = d64_load_rom,
281307
.load_file = d64_load_file,
282308
.load_save = d64_load_save,

src/flashcart/ed64/ed64_vseries.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ static flashcart_t flashcart_ed64_vseries = {
140140
.init = ed64_vseries_init,
141141
.deinit = ed64_vseries_deinit,
142142
.has_feature = ed64_vseries_has_feature,
143+
.get_firmware_version = NULL, // FIXME: show the returned firmware version info.
143144
.load_rom = ed64_vseries_load_rom,
144145
.load_file = ed64_vseries_load_file,
145146
.load_save = ed64_vseries_load_save,

src/flashcart/flashcart.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ bool flashcart_has_feature (flashcart_features_t feature) {
156156
return flashcart->has_feature(feature);
157157
}
158158

159+
flashcart_firmware_version_t flashcart_get_firmware_version (void) {
160+
return flashcart->get_firmware_version();
161+
}
162+
159163
flashcart_err_t flashcart_load_rom (char *rom_path, bool byte_swap, flashcart_progress_callback_t *progress) {
160164
flashcart_err_t err;
161165

src/flashcart/flashcart.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ typedef struct {
5757
uint8_t defect_tracks[16][12];
5858
} flashcart_disk_parameters_t;
5959

60+
/** @brief Flashcart Firmware version Structure. */
61+
typedef struct {
62+
uint16_t major;
63+
uint16_t minor;
64+
uint32_t revision;
65+
} flashcart_firmware_version_t;
66+
6067
typedef void flashcart_progress_callback_t (float progress);
6168

6269
/** @brief Flashcart Structure */
@@ -67,6 +74,8 @@ typedef struct {
6774
flashcart_err_t (*deinit) (void);
6875
/** @brief The flashcart feature function */
6976
bool (*has_feature) (flashcart_features_t feature);
77+
/** @brief The flashcart firmware version function */
78+
flashcart_firmware_version_t (*get_firmware_version) (void);
7079
/** @brief The flashcart ROM load function */
7180
flashcart_err_t (*load_rom) (char *rom_path, flashcart_progress_callback_t *progress);
7281
/** @brief The flashcart file load function */
@@ -88,6 +97,7 @@ char *flashcart_convert_error_message (flashcart_err_t err);
8897
flashcart_err_t flashcart_init (const char **storage_prefix);
8998
flashcart_err_t flashcart_deinit (void);
9099
bool flashcart_has_feature (flashcart_features_t feature);
100+
flashcart_firmware_version_t flashcart_get_firmware_version (void);
91101
flashcart_err_t flashcart_load_rom (char *rom_path, bool byte_swap, flashcart_progress_callback_t *progress);
92102
flashcart_err_t flashcart_load_file (char *file_path, uint32_t rom_offset, uint32_t file_offset);
93103
flashcart_err_t flashcart_load_save (char *save_path, flashcart_save_type_t save_type);

0 commit comments

Comments
 (0)