mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-10 08:50:23 +00:00
More documentation for sched.c (#1219)
* More documentation for sched.c * VI retrace -> vertical retrace, attempt to clarify comment in viconfig * Further review changes, fix inconsistent capitalization of PreNMI (PRENMI -> PreNMI) * Fix typo Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Change TaskSwapBuffer, change comment on OS_SC_DRAM_DLIST to unimplemented * Rename SchedContext/gSchedContext to Scheduler/gScheduler * Comments fixes Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Format Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
parent
ee5ac838b6
commit
1738b19d63
20 changed files with 449 additions and 268 deletions
|
@ -10,7 +10,7 @@ OSViMode gViConfigMode;
|
|||
u8 D_80013960;
|
||||
|
||||
s8 D_80009430 = 1;
|
||||
vu8 gViConfigUseDefault = 1;
|
||||
vu8 gViConfigBlack = true;
|
||||
u8 gViConfigAdditionalScanLines = 0;
|
||||
u32 gViConfigFeatures = OS_VI_DITHER_FILTER_ON | OS_VI_GAMMA_OFF;
|
||||
f32 gViConfigXScale = 1.0;
|
||||
|
@ -75,8 +75,8 @@ void Idle_ThreadEntry(void* arg) {
|
|||
|
||||
D_80009430 = 1;
|
||||
osViSetMode(&gViConfigMode);
|
||||
ViConfig_UpdateVi(1);
|
||||
osViBlack(1);
|
||||
ViConfig_UpdateVi(true);
|
||||
osViBlack(true);
|
||||
osViSwapBuffer(0x803DA80); //! @bug Invalid vram address (probably intended to be 0x803DA800)
|
||||
osCreatePiManager(OS_PRIORITY_PIMGR, &gPiMgrCmdQueue, sPiMgrCmdBuff, ARRAY_COUNT(sPiMgrCmdBuff));
|
||||
StackCheck_Init(&sMainStackInfo, sMainStack, STACK_TOP(sMainStack), 0, 0x400, "main");
|
||||
|
|
|
@ -2,16 +2,21 @@
|
|||
#include "vt.h"
|
||||
|
||||
// this should probably go elsewhere but right now viconfig.o is the only object between idle and z_std_dma
|
||||
OSPiHandle* gCartHandle = 0;
|
||||
OSPiHandle* gCartHandle = NULL;
|
||||
|
||||
void ViConfig_UpdateVi(u32 black) {
|
||||
if (black) {
|
||||
// Black the screen on next call to ViConfig_UpdateBlack, skip most VI configuration
|
||||
|
||||
void ViConfig_UpdateVi(u32 mode) {
|
||||
if (mode != 0) {
|
||||
osSyncPrintf(VT_COL(YELLOW, BLACK) "osViSetYScale1(%f);\n" VT_RST, 1.0f);
|
||||
|
||||
if (osTvType == OS_TV_PAL) {
|
||||
osViSetMode(&osViModePalLan1);
|
||||
}
|
||||
|
||||
// Reset the VI y scale. The VI y scale is different between NTSC (1.0) and PAL (0.833)
|
||||
// and should be reset to 1.0 during PreNMI to ensure there are no issues when restarting.
|
||||
// (see section 30.4.3 VI Processing with PreNMI Events in the N64 Programming Manual)
|
||||
osViSetYScale(1.0f);
|
||||
} else {
|
||||
osViSetMode(&gViConfigMode);
|
||||
|
@ -34,13 +39,13 @@ void ViConfig_UpdateVi(u32 mode) {
|
|||
}
|
||||
}
|
||||
|
||||
gViConfigUseDefault = mode;
|
||||
gViConfigBlack = black;
|
||||
}
|
||||
|
||||
void ViConfig_UpdateBlack(void) {
|
||||
if (gViConfigUseDefault != 0) {
|
||||
osViBlack(1);
|
||||
if (gViConfigBlack) {
|
||||
osViBlack(true);
|
||||
} else {
|
||||
osViBlack(0);
|
||||
osViBlack(false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue