Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cubeboot/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ int main(int argc, char **argv) {
set_patch_value(symshdr, syment, symstringdata, "force_progressive", settings.progressive_enabled);
set_patch_value(symshdr, syment, symstringdata, "force_widescreen", settings.force_widescreen);
set_patch_value(symshdr, syment, symstringdata, "force_swiss_boot", settings.force_swiss_default);
set_patch_value(symshdr, syment, symstringdata, "suppress_boot_setup_and_rtc_errors", settings.suppress_rtc_errors);

set_patch_value(symshdr, syment, symstringdata, "disable_mcp_select", settings.disable_mcp_select);
set_patch_value(symshdr, syment, symstringdata, "show_watermark", settings.show_watermark);
Expand Down
9 changes: 9 additions & 0 deletions cubeboot/source/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@ void load_settings() {
settings.disable_mcp_select = disable_mcp_select;
}

// suppress_rtc_errors
int suppress_rtc_errors = 1;
if (!ini_sget(conf, "cubeboot", "suppress_rtc_errors", "%d", &suppress_rtc_errors)) {
settings.suppress_rtc_errors = 1;
} else {
iprintf("Found suppress_boot_setup_and_rtc_errors = %d\n", suppress_rtc_errors);
settings.suppress_rtc_errors = suppress_rtc_errors;
}

// button presses
for (int i = 0; i < (sizeof(buttons_names) / sizeof(char *)); i++) {
char *button_name = buttons_names[i];
Expand Down
1 change: 1 addition & 0 deletions cubeboot/source/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ typedef struct settings {
u32 force_widescreen;
u32 preboot_delay_ms;
u32 postboot_delay_ms;
u32 suppress_rtc_errors;
char *default_program;
char *boot_buttons[MAX_BUTTONS];
menu_grid_type_t menu_grid_type;
Expand Down
3 changes: 3 additions & 0 deletions patches/linker/link_ntsc10.ld
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,6 @@ ntsc10_EXIImm = 0x81334d4c;
ntsc10_EXIImmEx = 0x81334fa8;

ntsc10_is_key_repeat = 0x81302ef8;

ntsc10_boot_setup_check = 0x813022b8;
ntsc10_boot_rtc_check = 0x813022b0;
3 changes: 3 additions & 0 deletions patches/linker/link_ntsc11.ld
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,6 @@ ntsc11_EXIImm = 0x8135a774;
ntsc11_EXIImmEx = 0x8135a9d0;

ntsc11_is_key_repeat = 0x81302de0;

ntsc11_boot_setup_check = 0x813020c0;
ntsc11_boot_rtc_check = 0x813020b8;
3 changes: 3 additions & 0 deletions patches/linker/link_ntsc12_001.ld
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ ntsc12_001_EXIImm = 0x81363b64;
ntsc12_001_EXIImmEx = 0x81363dc0;

ntsc12_001_is_key_repeat = 0x8130317c;

ntsc12_001_boot_setup_check = 0x81302474;
ntsc12_001_boot_rtc_check = 0x8130246c;
3 changes: 3 additions & 0 deletions patches/linker/link_ntsc12_101.ld
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ ntsc12_101_EXIImm = 0x81363cc8;
ntsc12_101_EXIImmEx = 0x81363f24;

ntsc12_101_is_key_repeat = 0x81303194;

ntsc12_101_boot_setup_check = 0x8130248c;
ntsc12_101_boot_rtc_check = 0x81302484;
3 changes: 3 additions & 0 deletions patches/linker/link_pal10.ld
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,6 @@ pal10_EXIImm = 0x8135dd54;
pal10_EXIImmEx = 0x8135dfb0;

pal10_is_key_repeat = 0x81302de0;

pal10_boot_setup_check = 0x813020c0;
pal10_boot_rtc_check = 0x813020b8;
3 changes: 3 additions & 0 deletions patches/linker/link_pal11.ld
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ pal11_EXIImm = 0x8135a694;
pal11_EXIImmEx = 0x8135a8f0;

pal11_is_key_repeat = 0x81302de0;

pal11_boot_setup_check = 0x813020c0;
pal11_boot_rtc_check = 0x813020b8;
3 changes: 3 additions & 0 deletions patches/linker/link_pal12.ld
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,6 @@ pal12_EXIImm = 0x81367040;
pal12_EXIImmEx = 0x8136729c;

pal12_is_key_repeat = 0x81302f48;

pal12_boot_setup_check = 0x81302240;
pal12_boot_rtc_check = 0x81302238;
20 changes: 20 additions & 0 deletions patches/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ __attribute_data__ char cube_logo_path[MAX_FILE_NAME] = {0};
__attribute_data__ u32 force_progressive = 0;
__attribute_data__ u32 force_widescreen = 0;
__attribute_data__ u32 force_swiss_boot = 0;
__attribute_data__ u32 suppress_boot_setup_and_rtc_errors = 1;

// used if we are switching to 60Hz on a PAL IPL
__attribute_data__ static int fix_pal_ntsc = 0;
Expand Down Expand Up @@ -101,6 +102,9 @@ typedef struct {

__attribute_reloc__ projection_parameters_t *projection_parameters;

__attribute_reloc__ u32 (*boot_setup_check)();
__attribute_reloc__ u32 (*boot_rtc_check)();

__attribute_used__ void mod_cube_colors() {
if (cube_color == 0) {
OSReport("Using default colors\n");
Expand Down Expand Up @@ -376,6 +380,22 @@ __attribute_used__ void pre_thread_init() {
}
}

__attribute_used__ s32 patch_boot_setup_check() {
if (suppress_boot_setup_and_rtc_errors) {
return 0;
}

return boot_setup_check();
}

__attribute_used__ s32 patch_boot_rtc_check() {
if (suppress_boot_setup_and_rtc_errors) {
return 0;
}

return boot_rtc_check();
}

__attribute_used__ void pre_menu_init(int unk) {
menu_init(unk);

Expand Down
8 changes: 4 additions & 4 deletions patches/source/patch.s
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ patch_inst_pal "_gameselect_draw_helper" 0x81327e04 0x8132735c 0x81327f44 routin
patch_inst_ntsc "_force_valid_encoding" 0x81345130 0x8136cdd4 0x8135a3e8 0x8135a3e8 routine_load_r0_r3_val1
patch_inst_pal "_force_valid_encoding" 0x813703b4 0x8136ccf4 0x8135d768 routine_load_r0_r3_val1

patch_inst_ntsc "_ignore_boot_error_setup" 0x8130bad8 0x8130bcd8 0x8130c04c 0x8130c064 li r0, 0x3
patch_inst_pal "_ignore_boot_error_setup" 0x8130bf30 0x8130bc04 0x8130c070 li r0, 0x3
patch_inst_ntsc "_ignore_boot_error_setup" 0x8130bacc 0x8130bccc 0x8130c040 0x8130c058 bl patch_boot_setup_check
patch_inst_pal "_ignore_boot_error_setup" 0x8130bf24 0x8130bbf8 0x8130c064 bl patch_boot_setup_check

patch_inst_ntsc "_ignore_boot_error_rtc" 0x8130bac0 0x8130bcc0 0x8130c034 0x8130c04c li r0, 0x3
patch_inst_pal "_ignore_boot_error_rtc" 0x8130bf18 0x8130bbec 0x8130c058 li r0, 0x3
patch_inst_ntsc "_ignore_boot_error_rtc" 0x8130bab4 0x8130bcb4 0x8130c028 0x8130c040 bl patch_boot_rtc_check
patch_inst_pal "_ignore_boot_error_rtc" 0x8130bf0c 0x8130bbe0 0x8130c04c bl patch_boot_rtc_check

patch_inst_ntsc "_stub_dvdwait" 0x00000000 0x8130108c 0x81301440 0x81301444 nop
patch_inst_pal "_stub_dvdwait" 0x8130108c 0x8130108c 0x813011f8 nop
Expand Down