mirror of
https://github.com/zeldaret/af.git
synced 2026-09-28 14:50:04 -04:00
Viconfig OK (#29)
This commit is contained in:
@@ -253,7 +253,7 @@ extract:
|
||||
lib:
|
||||
$(MAKE) -C lib
|
||||
|
||||
diff-init: all
|
||||
diff-init: uncompressed
|
||||
$(RM) -rf expected/
|
||||
mkdir -p expected/
|
||||
cp -r $(BUILD_DIR) expected/$(BUILD_DIR)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
// extern UNK_TYPE D_8003BBC4_jp;
|
||||
// extern UNK_TYPE D_FLT_8003BBC8_jp;
|
||||
// extern UNK_TYPE D_FLT_8003BBCC_jp;
|
||||
// extern UNK_TYPE gCartHandle;
|
||||
extern OSPiHandle* gCartHandle; // TODO: Determine where this goes
|
||||
// extern UNK_TYPE D_8003BBE0_jp;
|
||||
// extern UNK_TYPE D_8003BBF0_jp;
|
||||
// extern UNK_TYPE D_8003BC38_jp;
|
||||
@@ -248,8 +248,8 @@
|
||||
// extern UNK_TYPE B_8003FE00_jp;
|
||||
// extern UNK_TYPE B_8003FEC8_jp;
|
||||
// extern UNK_TYPE B_8003FEE0_jp;
|
||||
// extern UNK_TYPE B_8003FF30_jp;
|
||||
// extern UNK_TYPE B_8003FF31_jp;
|
||||
// extern UNK_TYPE gViConfigBlackNext;
|
||||
// extern UNK_TYPE gViConfigBlack;
|
||||
// extern UNK_TYPE B_8003FF40_jp;
|
||||
// extern UNK_TYPE B_8003FF5C_jp;
|
||||
// extern UNK_TYPE B_8003FF60_jp;
|
||||
|
||||
@@ -816,7 +816,7 @@
|
||||
// extern UNK_TYPE D_8010EF80_jp;
|
||||
// extern UNK_TYPE gamePT;
|
||||
// extern UNK_TYPE D_8010EFA0_jp;
|
||||
// extern UNK_TYPE D_8010EFB0_jp;
|
||||
extern vs32 D_8010EFB0_jp; // TODO: Determine where this goes
|
||||
// extern UNK_TYPE D_8010EFB8_jp;
|
||||
// extern UNK_TYPE D_8010EFC0_jp;
|
||||
// extern UNK_TYPE D_8010EFC8_jp;
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
|
||||
extern OSViMode gViConfigMode;
|
||||
|
||||
extern u32 gViConfigFeatures;
|
||||
extern f32 gViConfigXScale;
|
||||
extern f32 gViConfigYScale;
|
||||
|
||||
void Idle_ThreadEntry(void* arg);
|
||||
|
||||
#endif
|
||||
|
||||
+5
-2
@@ -3,7 +3,10 @@
|
||||
|
||||
#include "ultra64.h"
|
||||
|
||||
// void func_800260A0_jp();
|
||||
// void func_800261F4_jp();
|
||||
void ViConfig_UpdateVi(u32 arg0);
|
||||
void ViConfig_UpdateBlack(void);
|
||||
|
||||
u8 gViConfigBlackNext;
|
||||
u8 gViConfigBlack;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -9,8 +9,8 @@ Main_ThreadEntry = 0x80025DF0; // type:func
|
||||
Idle_InitVideo = 0x80025E6C; // type:func
|
||||
Idle_ThreadEntry = 0x80025FD0; // type:func
|
||||
|
||||
func_800260A0_jp = 0x800260A0; // type:func
|
||||
func_800261F4_jp = 0x800261F4; // type:func
|
||||
ViConfig_UpdateVi = 0x800260A0; // type:func
|
||||
ViConfig_UpdateBlack = 0x800261F4; // type:func
|
||||
|
||||
func_80026240_jp = 0x80026240; // type:func
|
||||
func_8002628C_jp = 0x8002628C; // type:func
|
||||
@@ -519,8 +519,8 @@ sMainStackInfo = 0x8003FDE0; //
|
||||
sPiMgrCmdBuff = 0x8003FE00; //
|
||||
sPiMgrCmdQueue = 0x8003FEC8; //
|
||||
gViConfigMode = 0x8003FEE0; //
|
||||
B_8003FF30_jp = 0x8003FF30; // type:u8
|
||||
B_8003FF31_jp = 0x8003FF31; // type:u8
|
||||
gViConfigBlackNext = 0x8003FF30; // type:u8
|
||||
gViConfigBlack = 0x8003FF31; // type:u8
|
||||
B_8003FF40_jp = 0x8003FF40; //
|
||||
B_8003FF5C_jp = 0x8003FF5C; // type:u16
|
||||
B_8003FF60_jp = 0x8003FF60; //
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "libc/stdint.h"
|
||||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
|
||||
#include "idle.h"
|
||||
#include "m_thread.h"
|
||||
@@ -7,8 +6,6 @@
|
||||
#include "stack.h"
|
||||
#include "stackcheck.h"
|
||||
|
||||
extern OSPiHandle* gCartHandle; // TODO: Determine where this goes
|
||||
|
||||
STACK(sIdleStack, 0x400);
|
||||
StackEntry sIdleStackInfo;
|
||||
StackEntry sBootStackInfo;
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
#include "global.h"
|
||||
#include "idle.h"
|
||||
|
||||
u8 gViConfigBlackNext;
|
||||
u8 gViConfigBlack;
|
||||
|
||||
void ViConfig_UpdateVi(u32 black) {
|
||||
if ((black || (D_8010EFB0_jp == 0)) && ((black != gViConfigBlack) || (black != gViConfigBlackNext))) {
|
||||
if (black) {
|
||||
if (osTvType == OS_TV_PAL) {
|
||||
osViSetMode(&osViModePalLan1);
|
||||
} else {
|
||||
osViSetMode(&osViModeNtscLan1);
|
||||
}
|
||||
|
||||
if (gViConfigYScale == 1.0f) {
|
||||
osViBlack(1);
|
||||
} else {
|
||||
osViSetYScale(1.0f);
|
||||
}
|
||||
} else {
|
||||
osViSetMode(&gViConfigMode);
|
||||
|
||||
if (gViConfigFeatures != 0) {
|
||||
osViSetSpecialFeatures(gViConfigFeatures);
|
||||
}
|
||||
|
||||
if (gViConfigXScale != 1.0f) {
|
||||
osViSetXScale(gViConfigXScale);
|
||||
}
|
||||
|
||||
if (gViConfigYScale != 1.0f) {
|
||||
osViSetYScale(gViConfigYScale);
|
||||
}
|
||||
}
|
||||
gViConfigBlackNext = black;
|
||||
}
|
||||
}
|
||||
|
||||
void ViConfig_UpdateBlack(void) {
|
||||
if (gViConfigBlackNext != gViConfigBlack) {
|
||||
osViBlack(gViConfigBlackNext);
|
||||
gViConfigBlack = gViConfigBlackNext;
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -8,8 +8,7 @@
|
||||
- [0x001060, c, boot/boot_main]
|
||||
|
||||
- [0x0011F0, c, boot/idle]
|
||||
|
||||
- [0x0014A0, asm, boot/viconfig]
|
||||
- [0x0014A0, c, boot/viconfig]
|
||||
- [0x001640, asm, boot/001640]
|
||||
- [0x0017F0, asm, boot/z_std_dma]
|
||||
- [0x0022A0, asm, boot/yaz0]
|
||||
@@ -265,8 +264,9 @@
|
||||
- [0x019D00, rodata, boot/build]
|
||||
|
||||
- { start: 0x019D40, type: .bss, vram: 0x8003E940, name: boot/boot_main }
|
||||
- { start: 0x019D40, type: .bss, vram: 0x8003F330, name: boot/idle}
|
||||
- { start: 0x019D40, type: bss, vram: 0x8003FF30, name: boot/8003FF30}
|
||||
- { start: 0x019D40, type: .bss, vram: 0x8003F330, name: boot/idle }
|
||||
- { start: 0x019D40, type: .bss, vram: 0x8003FF30, name: boot/viconfig }
|
||||
- { start: 0x019D40, type: bss, vram: 0x8003FF40, name: boot/8003FF40 }
|
||||
- { start: 0x019D40, type: bss, vram: 0x800419A0, name: boot/gfxprint }
|
||||
- { start: 0x019D40, type: bss, vram: 0x800419B0, name: boot/mathf }
|
||||
- { start: 0x019D40, type: bss, vram: 0x800419C0, name: boot/800419C0 }
|
||||
|
||||
Reference in New Issue
Block a user