From 689c70d25a3162ae80dbf48f554018fb59d89eb2 Mon Sep 17 00:00:00 2001 From: Reonu Date: Tue, 29 Jun 2021 20:56:38 +0100 Subject: [PATCH 1/2] skip goddard screen if goddard isn't built --- levels/intro/script.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/levels/intro/script.c b/levels/intro/script.c index 59978a0c..b021b4b7 100644 --- a/levels/intro/script.c +++ b/levels/intro/script.c @@ -45,6 +45,9 @@ const LevelScript level_intro_splash_screen[] = { const LevelScript level_intro_mario_head_regular[] = { INIT_LEVEL(), +#ifndef GODDARD + EXIT_AND_EXECUTE(/*seg*/ 0x14, _menuSegmentRomStart, _menuSegmentRomEnd, level_main_menu_entry_1), +#endif BLACKOUT(/*active*/ TRUE), FIXED_LOAD(/*loadAddr*/ _goddardSegmentStart, /*romStart*/ _goddardSegmentRomStart, /*romEnd*/ _goddardSegmentRomEnd), #ifdef GODDARD From 15c98d5bb34ea727187f5153c8a10e0a596f7e39 Mon Sep 17 00:00:00 2001 From: Reonu Date: Wed, 30 Jun 2021 22:42:48 +0100 Subject: [PATCH 2/2] applied instant input patch --- src/game/game_init.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/game/game_init.c b/src/game/game_init.c index 24f02cf2..2097383d 100644 --- a/src/game/game_init.c +++ b/src/game/game_init.c @@ -332,7 +332,10 @@ void rendering_init(void) { end_master_display_list(); send_display_list(&gGfxPool->spTask); - frameBufferIndex++; + // Skip incrementing the initial framebuffer index on emulators so that they display immediately as the Gfx task finishes + if ((*(volatile u32 *)0xA4100010) != 0) { // Read RDP Clock Register, has a value of zero on emulators + frameBufferIndex++; + } gGlobalTimer++; } @@ -358,11 +361,14 @@ void display_and_vsync(void) { osViSwapBuffer((void *) PHYSICAL_TO_VIRTUAL(gPhysicalFrameBuffers[sCurrFBNum])); profiler_log_thread5_time(THREAD5_END); osRecvMesg(&gGameVblankQueue, &D_80339BEC, OS_MESG_BLOCK); - if (++sCurrFBNum == 3) { - sCurrFBNum = 0; - } - if (++frameBufferIndex == 3) { - frameBufferIndex = 0; + // Skip swapping buffers on emulator so that they display immediately as the Gfx task finishes + if ((*(volatile u32 *)0xA4100010) != 0) { // Read RDP Clock Register, has a value of zero on emulators + if (++sCurrFBNum == 3) { + sCurrFBNum = 0; + } + if (++frameBufferIndex == 3) { + frameBufferIndex = 0; + } } gGlobalTimer++; }