mirror of
https://github.com/zeldaret/oot
synced 2026-05-27 08:08:42 -04:00
174af7384d
* cleanup libultra * fixes - use quotes instead of <> for includes - add macros for zelda specific thread priorities - fix Makefile - properly format the remaining pfs structs * fix button macros + add CHECK_BTN_ANY/CHECK_BTN_ALL * remove ULTRA_ABS * fix includes * update z_player.c/z_lib.c + run format.sh * merge upstream/master * fix include in En_Goroiwa * fix includes
35 lines
808 B
C
35 lines
808 B
C
#include "global.h"
|
|
|
|
OSViContext vi[2] = { 0 };
|
|
OSViContext* __osViCurr = &vi[0];
|
|
OSViContext* __osViNext = &vi[1];
|
|
|
|
void __osViInit() {
|
|
bzero(vi, sizeof(vi));
|
|
__osViCurr = &vi[0];
|
|
__osViNext = &vi[1];
|
|
|
|
__osViNext->retraceCount = 1;
|
|
__osViCurr->retraceCount = 1;
|
|
__osViNext->buffer = (void*)0x80000000;
|
|
__osViCurr->buffer = (void*)0x80000000;
|
|
|
|
if (osTvType == 0) {
|
|
__osViNext->modep = &osViModePalLan1;
|
|
} else if (osTvType == 2) {
|
|
__osViNext->modep = &osViModeMpalLan1;
|
|
} else {
|
|
__osViNext->modep = &osViModeNtscLan1;
|
|
}
|
|
|
|
__osViNext->state = 0x20;
|
|
__osViNext->features = __osViNext->modep->comRegs.ctrl;
|
|
|
|
while (HW_REG(VI_CURRENT_REG, u32) > 10) {
|
|
;
|
|
}
|
|
|
|
HW_REG(VI_CONTROL_REG, u32) = 0;
|
|
__osViSwapContext();
|
|
}
|