|
3 | 3 | #include "libpressf/src/emu.h" |
4 | 4 | #include "libpressf/src/font.h" |
5 | 5 |
|
| 6 | +#include "emu.h" |
| 7 | +#include "error.h" |
6 | 8 | #include "main.h" |
7 | 9 | #include "menu.h" |
8 | 10 |
|
@@ -57,7 +59,7 @@ static void pfu_menu_entry_back(void) |
57 | 59 | unsigned dummy = 0; |
58 | 60 |
|
59 | 61 | f8_write(&emu.system, 0x0800, &dummy, sizeof(dummy)); |
60 | | - pfu_state_set(PFU_STATE_EMU); |
| 62 | + pfu_emu_switch(); |
61 | 63 | pressf_reset(&emu.system); |
62 | 64 | } |
63 | 65 |
|
@@ -125,7 +127,7 @@ static void pfu_menu_entry_file(pfu_menu_entry_t *entry) |
125 | 127 | if (entry) |
126 | 128 | { |
127 | 129 | pfu_load_rom(0x0800, entry->title, entry->current_value); |
128 | | - pfu_state_set(PFU_STATE_EMU); |
| 130 | + pfu_emu_switch(); |
129 | 131 | pressf_reset(&emu.system); |
130 | 132 | } |
131 | 133 | } |
@@ -176,7 +178,7 @@ static void pfu_menu_init_roms_source(pfu_menu_ctx_t *menu, const char *src_path |
176 | 178 | { |
177 | 179 | if (dir.d_type == DT_REG) |
178 | 180 | { |
179 | | - /* Load BIOS if found on SD Card */ |
| 181 | + /* Load BIOS if found */ |
180 | 182 | if (!strncmp(dir.d_name, "sl31253.bin", 8)) |
181 | 183 | { |
182 | 184 | if (!emu.bios_a_loaded) |
@@ -222,6 +224,12 @@ static void pfu_menu_init_roms(void) |
222 | 224 | snprintf(menu.menu_subtitle, sizeof(menu.menu_subtitle), "%s", "Select a ROM to load."); |
223 | 225 | emu.menu_roms = menu; |
224 | 226 | } |
| 227 | + else |
| 228 | + pfu_error_switch("Press F Ultra requires Channel F BIOS data to be stored on\n" |
| 229 | + "the SD Card in the \"press-f\" directory.\n\n" |
| 230 | + "Please include both the $03sl31253.bin$01 and $03sl31254.bin$01 BIOS images.\n\n" |
| 231 | + "Alternatively, this data can be compiled in statically.\n\n" |
| 232 | + "See https://github.com/celerizer/Press-F-Ultra for details."); |
225 | 233 | } |
226 | 234 |
|
227 | 235 | static uint8_t sine_color; |
@@ -293,7 +301,7 @@ static void pfu_menu_input(void) |
293 | 301 | } |
294 | 302 | } |
295 | 303 | else if (buttons.b) |
296 | | - pfu_state_set(PFU_STATE_EMU); |
| 304 | + pfu_emu_switch(); |
297 | 305 |
|
298 | 306 | if (menu->cursor < 0) |
299 | 307 | menu->cursor = 0; |
|
0 commit comments