diff --git a/Firm_Saturn/game_load.c b/Firm_Saturn/game_load.c index df72b69..8ba71f2 100644 --- a/Firm_Saturn/game_load.c +++ b/Firm_Saturn/game_load.c @@ -21,8 +21,38 @@ void my_cdplayer(void) if(debug_flag&1) sci_init(); printk("\nLoad my multiPlayer ...\n"); - go = (void*)0x1d7c; - go(0); + + *(u8*)(0xfffffe92) = 0x10; + *(u8*)(0xfffffe92) = 0x1; + + *(u32*)(0xffffff40) = 0x00; + *(u32*)(0xffffff44) = 0x00; + *(u16*)(0xffffff48) = 0x00; + *(u32*)(0xffffff60) = 0x00; + *(u32*)(0xffffff64) = 0x00; + *(u16*)(0xffffff68) = 0x00; + *(u32*)(0xffffff70) = 0x00; + *(u32*)(0xffffff74) = 0x00; + *(u16*)(0xffffff78) = 0x00; + + *(u8*)(0xfffffe71) = 0x0; + *(u8*)(0xfffffe72) = 0x0; + + *(u32*)(0xffffff80) = 0x00; + *(u32*)(0xffffff84) = 0x00; + *(u32*)(0xffffff88) = 0x01; + *(u32*)(0xffffff8c) = 0x00; + *(u32*)(0xffffff90) = 0x00; + *(u32*)(0xffffff94) = 0x00; + *(u32*)(0xffffff98) = 0x01; + *(u32*)(0xffffff9c) = 0x00; + + *(u32*)(0xffffff08) = 0x00; + *(u32*)(0xffffffb0) = 0x00; + + go = (void*)*(u32*)(0x060002dc); + go(3); + *(u32*)(0x06000348) = 0xffffffff; @@ -154,8 +184,10 @@ static void read_1st(void) go(); patch_game((char*)0x06002020); - *(u32*)(0x06000358) = (u32)bup_init; - *(u32*)(0x0600026c) = (u32)my_cdplayer; + if(need_bup){ + *(u32*)(0x06000358) = (u32)bup_init; + *(u32*)(0x0600026c) = (u32)my_cdplayer; + } // 0x06000320: 0x060006b0 bios_set_clock_speed memcpy((u8*)0x060006b8, code_06b8, sizeof(code_06b8)); diff --git a/Firm_Saturn/main.c b/Firm_Saturn/main.c index a16b2db..867d0ed 100644 --- a/Firm_Saturn/main.c +++ b/Firm_Saturn/main.c @@ -563,6 +563,7 @@ int main_handle(int ctrl) select_game(); return MENU_RESTART; }else if(index==1){ + write_file("/SAROO/SS_BUP.BIN", 0, 0x10000, (void*)0x20180000); cdblock_on(0); bios_run_cd_player(); return MENU_RESTART; @@ -663,10 +664,11 @@ int _main(void) debug_flag = LE32((void*)(SYSINFO_ADDR+0x08)); // restore bios_loadcd_init1 - *(u32*)(0x060002dc) = 0x2650; + *(u32*)(0x060002dc) = *(u32*)(0x2000111c); *(u32*)(0x02000f04) = (u32)cdc_read_sector; *(u32*)(0x02000f08) = (u32)read_file; *(u32*)(0x02000f0c) = (u32)write_file; + *(u32*)(0x02000f30) = (u32)bios_cd_cmd; *(u32*)(0x02000f38) = (u32)sci_init; *(u32*)(0x02000f3c) = (u32)printk;