Fix some warnings, and update mips to c tool

This commit is contained in:
Ryan Myers
2021-10-21 22:03:22 -04:00
parent f2ec5d4d45
commit 438426784b
2 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/sh
ASMFILE=$(find . -type f -name "*$1.s")
python3 ../mips_to_c/mips_to_c.py --context ctx.c -f $1 $ASMFILE > $1.c
python3 ../mips_to_c/mips_to_c.py --compiler ido --pointer-style right --context ctx.c -f $1 $ASMFILE > $1.c
+9 -9
View File
@@ -139,13 +139,13 @@ void init_vi_settings(void) {
} else if (osTvType == TV_TYPE_MPAL) {
tvViMode = &osViModeMpalLpn1;
}
memory_copy(tvViMode, &gTvViMode, sizeof(OSViMode));
memory_copy((u8 *)tvViMode, (u8 *)&gTvViMode, sizeof(OSViMode));
if (osTvType == TV_TYPE_PAL) {
//TODO: Figure out what the 0x18 is for
gTvViMode.fldRegs[0].vStart -= (0x18 << 16);
gTvViMode.fldRegs[1].vStart -= (0x18 << 16);
gTvViMode.fldRegs[0].vStart += 0x18;
gTvViMode.fldRegs[1].vStart += 0x18;
//A simple osViExtendVStart to add an additional 24 scanlines?
gTvViMode.fldRegs[0].vStart -= (24 << 16);
gTvViMode.fldRegs[1].vStart -= (24 << 16);
gTvViMode.fldRegs[0].vStart += 24;
gTvViMode.fldRegs[1].vStart += 24;
}
osViSetMode(&gTvViMode);
break;
@@ -158,7 +158,7 @@ void init_vi_settings(void) {
tvViMode = &osViModeMpalLpn1;
}
memory_copy(tvViMode, &gTvViMode, sizeof(OSViMode));
memory_copy((u8 *)tvViMode, (u8 *)&gTvViMode, sizeof(OSViMode));
gTvViMode.comRegs.width = WIDTH(640);
gTvViMode.comRegs.xScale = SCALE(1, 0);
gTvViMode.fldRegs[0].origin = ORIGIN(1280);
@@ -173,7 +173,7 @@ void init_vi_settings(void) {
} else if (osTvType == TV_TYPE_MPAL) {
tvViMode = &osViModeMpalLan1;
}
memory_copy(tvViMode, &gTvViMode, sizeof(OSViMode));
memory_copy((u8 *)tvViMode, (u8 *)&gTvViMode, sizeof(OSViMode));
gTvViMode.comRegs.width = WIDTH(640);
gTvViMode.comRegs.xScale = SCALE(1, 0);
gTvViMode.fldRegs[0].origin = ORIGIN(1280);
@@ -204,7 +204,7 @@ void init_vi_settings(void) {
void init_framebuffer(s32 index) {
if (gVideoFramebuffers[index] != 0) {
func_80071538(gVideoFramebuffers[index]);
func_80071538((u8 *)gVideoFramebuffers[index]);
free_from_memory_pool(gVideoFramebuffers[index]);
}
gVideoFbWidths[index] = gVideoModeResolutions[gVideoModeIndex & 7].width;