1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-18 04:52:03 +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:
Tharo 2022-06-03 20:43:30 +01:00 committed by GitHub
parent ee5ac838b6
commit 1738b19d63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 449 additions and 268 deletions

View file

@ -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);
}
}