1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-25 09:45:02 +00:00

[PAL N64] Match VI mode setup (#2198)

This commit is contained in:
cadmic 2024-09-16 18:51:53 -07:00 committed by GitHub
parent 48780cd2b1
commit 3287437069
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 44 additions and 7 deletions

17
spec
View file

@ -105,15 +105,21 @@ beginseg
include "$(BUILD_DIR)/src/libultra/libc/bcopy.o" include "$(BUILD_DIR)/src/libultra/libc/bcopy.o"
include "$(BUILD_DIR)/src/libultra/os/resetglobalintmask.o" include "$(BUILD_DIR)/src/libultra/os/resetglobalintmask.o"
include "$(BUILD_DIR)/src/libultra/os/interrupt.o" include "$(BUILD_DIR)/src/libultra/os/interrupt.o"
#if !OOT_PAL_N64
include "$(BUILD_DIR)/src/libultra/io/vimodentsclan1.o" include "$(BUILD_DIR)/src/libultra/io/vimodentsclan1.o"
include "$(BUILD_DIR)/src/libultra/io/vimodempallan1.o" include "$(BUILD_DIR)/src/libultra/io/vimodempallan1.o"
#endif
include "$(BUILD_DIR)/src/libultra/io/vi.o" include "$(BUILD_DIR)/src/libultra/io/vi.o"
#if OOT_PAL_N64
include "$(BUILD_DIR)/src/libultra/io/vimodentsclan1.o"
include "$(BUILD_DIR)/src/libultra/io/vimodempallan1.o"
#endif
include "$(BUILD_DIR)/src/libultra/io/viswapcontext.o" include "$(BUILD_DIR)/src/libultra/io/viswapcontext.o"
include "$(BUILD_DIR)/src/libultra/io/pigetcmdq.o" include "$(BUILD_DIR)/src/libultra/io/pigetcmdq.o"
include "$(BUILD_DIR)/src/libultra/io/epiread.o" include "$(BUILD_DIR)/src/libultra/io/epiread.o"
include "$(BUILD_DIR)/src/libultra/io/visetspecial.o" include "$(BUILD_DIR)/src/libultra/io/visetspecial.o"
include "$(BUILD_DIR)/src/libultra/io/cartrominit.o" include "$(BUILD_DIR)/src/libultra/io/cartrominit.o"
#if OOT_DEBUG #if OOT_PAL_N64 || OOT_DEBUG
include "$(BUILD_DIR)/src/libultra/io/vimodefpallan1.o" include "$(BUILD_DIR)/src/libultra/io/vimodefpallan1.o"
#endif #endif
include "$(BUILD_DIR)/src/libultra/os/setfpccsr.o" include "$(BUILD_DIR)/src/libultra/os/setfpccsr.o"
@ -690,6 +696,11 @@ beginseg
include "$(BUILD_DIR)/src/audio/lib/thread.o" include "$(BUILD_DIR)/src/audio/lib/thread.o"
include "$(BUILD_DIR)/src/audio/lib/dcache.o" include "$(BUILD_DIR)/src/audio/lib/dcache.o"
include "$(BUILD_DIR)/src/audio/lib/aisetnextbuf.o" include "$(BUILD_DIR)/src/audio/lib/aisetnextbuf.o"
#if OOT_PAL_N64
pad_text
pad_text
pad_text
#endif
include "$(BUILD_DIR)/src/audio/lib/playback.o" include "$(BUILD_DIR)/src/audio/lib/playback.o"
include "$(BUILD_DIR)/src/audio/lib/effects.o" include "$(BUILD_DIR)/src/audio/lib/effects.o"
include "$(BUILD_DIR)/src/audio/lib/seqplayer.o" include "$(BUILD_DIR)/src/audio/lib/seqplayer.o"
@ -840,8 +851,10 @@ beginseg
include "$(BUILD_DIR)/src/libultra/mgu/translate.o" include "$(BUILD_DIR)/src/libultra/mgu/translate.o"
#endif #endif
include "$(BUILD_DIR)/src/libultra/io/contramwrite.o" include "$(BUILD_DIR)/src/libultra/io/contramwrite.o"
#if !OOT_DEBUG #if !OOT_PAL_N64 && !OOT_DEBUG
include "$(BUILD_DIR)/src/libultra/io/vimodefpallan1.o" include "$(BUILD_DIR)/src/libultra/io/vimodefpallan1.o"
#endif
#if !OOT_DEBUG
include "$(BUILD_DIR)/src/libultra/io/pfsgetstatus.o" include "$(BUILD_DIR)/src/libultra/io/pfsgetstatus.o"
include "$(BUILD_DIR)/src/libultra/io/contpfs.o" include "$(BUILD_DIR)/src/libultra/io/contpfs.o"
#endif #endif

View file

@ -1,6 +1,7 @@
#include "global.h" #include "global.h"
#include "stack.h" #include "stack.h"
#include "terminal.h" #include "terminal.h"
#include "versions.h"
#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" #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"
@ -63,10 +64,9 @@ void Idle_ThreadEntry(void* arg) {
gViConfigXScale = 1.0f; gViConfigXScale = 1.0f;
gViConfigYScale = 1.0f; gViConfigYScale = 1.0f;
#if OOT_DEBUG
// Allow both 60 Hz and 50 Hz
switch (osTvType) { switch (osTvType) {
#if !OOT_DEBUG
case OS_TV_PAL:
#endif
case OS_TV_NTSC: case OS_TV_NTSC:
gViConfigModeType = OS_VI_NTSC_LAN1; gViConfigModeType = OS_VI_NTSC_LAN1;
gViConfigMode = osViModeNtscLan1; gViConfigMode = osViModeNtscLan1;
@ -77,14 +77,38 @@ void Idle_ThreadEntry(void* arg) {
gViConfigMode = osViModeMpalLan1; gViConfigMode = osViModeMpalLan1;
break; break;
#if OOT_DEBUG
case OS_TV_PAL: case OS_TV_PAL:
gViConfigModeType = OS_VI_FPAL_LAN1; gViConfigModeType = OS_VI_FPAL_LAN1;
gViConfigMode = osViModeFpalLan1; gViConfigMode = osViModeFpalLan1;
gViConfigYScale = 0.833f; gViConfigYScale = 0.833f;
break; break;
#endif
} }
#elif !OOT_PAL_N64
// 60 Hz only (GameCube and NTSC N64)
switch (osTvType) {
case OS_TV_PAL:
case OS_TV_NTSC:
gViConfigModeType = OS_VI_NTSC_LAN1;
gViConfigMode = osViModeNtscLan1;
break;
case OS_TV_MPAL:
gViConfigModeType = OS_VI_MPAL_LAN1;
gViConfigMode = osViModeMpalLan1;
break;
}
#else
// 50 Hz only (PAL N64)
switch (osTvType) {
case OS_TV_NTSC:
case OS_TV_MPAL:
case OS_TV_PAL:
gViConfigModeType = OS_VI_FPAL_LAN1;
gViConfigMode = osViModeFpalLan1;
gViConfigYScale = 0.833f;
break;
}
#endif
D_80009430 = 1; D_80009430 = 1;
osViSetMode(&gViConfigMode); osViSetMode(&gViConfigMode);