mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-12 18:01:16 +00:00
[ntsc-1.0/1.1] Match PAL 1.0 viconfig changes (#2231)
* [ntsc-1.0/1.1] Match viconfig changes * SREG(48) -> R_VI_MODE_EDIT_STATE
This commit is contained in:
parent
86a146db24
commit
c6160e1980
12 changed files with 148 additions and 40 deletions
3
src/boot/carthandle.c
Normal file
3
src/boot/carthandle.c
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "ultra64.h"
|
||||
|
||||
OSPiHandle* gCartHandle = NULL;
|
|
@ -6,19 +6,33 @@
|
|||
#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64 ntsc-1.2:64"
|
||||
|
||||
OSThread sMainThread;
|
||||
#if OOT_VERSION < PAL_1_0
|
||||
STACK(sMainStack, 0x800);
|
||||
#else
|
||||
STACK(sMainStack, 0x900);
|
||||
#endif
|
||||
StackEntry sMainStackInfo;
|
||||
OSMesg sPiMgrCmdBuff[50];
|
||||
OSMesgQueue gPiMgrCmdQueue;
|
||||
OSViMode gViConfigMode;
|
||||
u8 gViConfigModeType;
|
||||
|
||||
s8 D_80009430 = 1;
|
||||
vu8 gViConfigBlack = true;
|
||||
u8 gViConfigAdditionalScanLines = 0;
|
||||
u32 gViConfigFeatures = OS_VI_DITHER_FILTER_ON | OS_VI_GAMMA_OFF;
|
||||
f32 gViConfigXScale = 1.0;
|
||||
f32 gViConfigYScale = 1.0;
|
||||
#if OOT_VERSION < PAL_1_0
|
||||
u8 gViConfigModeType = OS_VI_NTSC_LPN1;
|
||||
#else
|
||||
u8 gViConfigModeType;
|
||||
#endif
|
||||
|
||||
// Unused
|
||||
void* D_80009410[] = {
|
||||
osStopThread, __osSetHWIntrRoutine,
|
||||
#if PLATFORM_N64
|
||||
osEPiWriteIo, osEPiReadIo,
|
||||
#endif
|
||||
__osSetFpcCsr, __osGetFpcCsr, __osGetHWIntrRoutine, __osSetHWIntrRoutine, osViGetNextFramebuffer,
|
||||
#if !PLATFORM_N64
|
||||
bcmp,
|
||||
#endif
|
||||
};
|
||||
|
||||
void Main_ThreadEntry(void* arg) {
|
||||
OSTime time;
|
||||
|
@ -60,9 +74,11 @@ void Idle_ThreadEntry(void* arg) {
|
|||
|
||||
osCreateViManager(OS_PRIORITY_VIMGR);
|
||||
|
||||
#if OOT_VERSION >= PAL_1_0
|
||||
gViConfigFeatures = OS_VI_GAMMA_OFF | OS_VI_DITHER_FILTER_ON;
|
||||
gViConfigXScale = 1.0f;
|
||||
gViConfigYScale = 1.0f;
|
||||
#endif
|
||||
|
||||
#if OOT_DEBUG
|
||||
// Allow both 60 Hz and 50 Hz
|
||||
|
@ -110,11 +126,17 @@ void Idle_ThreadEntry(void* arg) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#if OOT_VERSION < PAL_1_0
|
||||
osViSetMode(&gViConfigMode);
|
||||
osViBlack(true);
|
||||
#else
|
||||
D_80009430 = 1;
|
||||
osViSetMode(&gViConfigMode);
|
||||
ViConfig_UpdateVi(true);
|
||||
osViBlack(true);
|
||||
osViSwapBuffer((void*)0x803DA80); //! @bug Invalid vram address (probably intended to be 0x803DA800)
|
||||
#endif
|
||||
|
||||
osCreatePiManager(OS_PRIORITY_PIMGR, &gPiMgrCmdQueue, sPiMgrCmdBuff, ARRAY_COUNT(sPiMgrCmdBuff));
|
||||
StackCheck_Init(&sMainStackInfo, sMainStack, STACK_TOP(sMainStack), 0, 0x400, "main");
|
||||
osCreateThread(&sMainThread, THREAD_ID_MAIN, Main_ThreadEntry, arg, STACK_TOP(sMainStack), THREAD_PRI_MAIN_INIT);
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
#include "global.h"
|
||||
#include "terminal.h"
|
||||
|
||||
// this should probably go elsewhere but right now viconfig.o is the only object between idle and z_std_dma
|
||||
OSPiHandle* gCartHandle = NULL;
|
||||
s8 D_80009430 = 1;
|
||||
vu8 gViConfigBlack = true;
|
||||
u8 gViConfigAdditionalScanLines = 0;
|
||||
u32 gViConfigFeatures = OS_VI_DITHER_FILTER_ON | OS_VI_GAMMA_OFF;
|
||||
f32 gViConfigXScale = 1.0;
|
||||
f32 gViConfigYScale = 1.0;
|
||||
|
||||
void ViConfig_UpdateVi(u32 black) {
|
||||
if (black) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "global.h"
|
||||
#include "region.h"
|
||||
#include "terminal.h"
|
||||
#include "versions.h"
|
||||
|
||||
s32 gCurrentRegion = 0;
|
||||
|
||||
|
@ -29,9 +30,11 @@ void Locale_Init(void) {
|
|||
case 'E': // "NTSC-U (North America)"
|
||||
gCurrentRegion = REGION_US;
|
||||
break;
|
||||
#if OOT_VERSION >= PAL_1_0
|
||||
case 'P': // "PAL (Europe)"
|
||||
gCurrentRegion = REGION_EU;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
PRINTF(VT_COL(RED, WHITE));
|
||||
PRINTF(T("z_locale_init: 日本用かアメリカ用か判別できません\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue