FPS fixes

This commit is contained in:
Sonic Dreamcaster
2025-10-24 02:58:19 -03:00
parent 3dccdc2401
commit 1a879c0285
2 changed files with 22 additions and 11 deletions
+16 -11
View File
@@ -1,15 +1,16 @@
#include "patches.h"
extern Gfx *gpDisplayList;
extern Gfx* gpDisplayList;
extern s32 gScreenWidth;
extern s32 gScreenHeight;
extern s32 _framebufferIndex_000BE020;
extern u8 *gDepthBuffer;
extern u8 *_framebuffer[3];
extern u8* gDepthBuffer;
extern u8* _framebuffer[3];
extern s32 D_800BD3E8;
extern u8 _red_000BDFEC;
extern u8 _green_000BDFED;
extern u8 _blue_000BDFEE;
extern u16 gGraphicsOption;
#if 0
RECOMP_PATCH void main_80000C74(void)
@@ -27,15 +28,19 @@ RECOMP_PATCH void main_80000C74(void)
}
#endif
#if 0
RECOMP_PATCH void func_80000DDC(void)
{
recomp_printf("FramebufferIndex: %d\n", _framebufferIndex_000BE020);
gDPSetColorImage(gpDisplayList++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth, OS_K0_TO_PHYSICAL(_framebuffer[_framebufferIndex_000BE020]));
if (D_800BD3E8 != 0)
{
#if 1
RECOMP_PATCH void func_80000DDC(void) {
// recomp_printf("FramebufferIndex: %d\n", _framebufferIndex_000BE020);
gGraphicsOption = 1; // force graphics to be Medium
gEXEnable(gpDisplayList++); // @recomp
gEXSetRDRAMExtended(gpDisplayList++, 1); // @recomp
gEXSetRefreshRate(gpDisplayList++, 60 / 1);
gDPSetColorImage(gpDisplayList++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gScreenWidth,
OS_K0_TO_PHYSICAL(_framebuffer[_framebufferIndex_000BE020]));
if (D_800BD3E8 != 0) {
gDPSetCycleType(gpDisplayList++, G_CYC_FILL);
gDPSetFillColor(gpDisplayList++, GPACK_RGBA5551(_red_000BDFEC, _green_000BDFED, _blue_000BDFEE, 1) << 16 | GPACK_RGBA5551(_red_000BDFEC, _green_000BDFED, _blue_000BDFEE, 1));
gDPSetFillColor(gpDisplayList++, GPACK_RGBA5551(_red_000BDFEC, _green_000BDFED, _blue_000BDFEE, 1) << 16 |
GPACK_RGBA5551(_red_000BDFEC, _green_000BDFED, _blue_000BDFEE, 1));
gDPFillRectangle(gpDisplayList++, 0, 0, gScreenWidth - 1, gScreenHeight - 1);
}
}
+6
View File
@@ -212,3 +212,9 @@ value = 0x00000000 # jal func_80000000 -> nop
func = "func_801C30EC"
vram = 0x801C313C
value = 0x00000000 # nop
# force 1 framebuffer for 8 MB
[[patches.instruction]]
func = "allocMemory"
vram = 0x8000207C
value = 0x24020001 # nop