summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorMegaMech <inkstudios1@hotmail.com>2024-05-02 12:21:35 -0600
committerMegaMech <inkstudios1@hotmail.com>2024-05-02 12:21:35 -0600
commite3774dc3771aae8f4b8f775b0afe38ce935393fd (patch)
treeebbb4e1d54a4a258d239efb2b52a09138f5fc16c /src/main.c
parentc76d7d4b9bd3fd5999a3bf2c2ddd7cda4f1a9b14 (diff)
Fixes
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/main.c b/src/main.c
index 74146d418..1600198a0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2,11 +2,11 @@
#define D_800DC510_AS_U16
#endif
#include <libultraship.h>
-#include <PR/os.h>
-#include <PR/ucode.h>
+#include <libultra/vi.h>
#include <macros.h>
#include <decode.h>
#include <mk64.h>
+#include <stubs.h>
#include "profiler.h"
#include "main.h"
@@ -206,7 +206,7 @@ void create_thread(OSThread *thread, OSId id, void (*entry)(void *), void *arg,
void isPrintfInit(void);
void main_func(void) {
#ifdef VERSION_EU
- osTvType = TV_TYPE_PAL;
+ osTvType = OS_TV_PAL;
#endif
osInitialize();
#ifdef DEBUG
@@ -215,7 +215,7 @@ void main_func(void) {
create_thread(&gIdleThread, 1, &thread1_idle, NULL, gIdleThreadStack + ARRAY_COUNT(gIdleThreadStack), 100);
osStartThread(&gIdleThread);
}
-
+extern OSViMode osViModeTable[];
/**
* Initialize hardware, start main thread, then idle.
*/
@@ -224,7 +224,7 @@ void thread1_idle(void *arg) {
#ifdef VERSION_EU
osViSetMode(&osViModeTable[OS_VI_PAL_LAN1]);
#else // VERSION_US
- if (osTvType == TV_TYPE_NTSC) {
+ if (osTvType == OS_TV_NTSC) {
osViSetMode(&osViModeTable[OS_VI_NTSC_LAN1]);
} else {
osViSetMode(&osViModeTable[OS_VI_MPAL_LAN1]);
@@ -248,7 +248,7 @@ void setup_mesg_queues(void) {
osCreateMesgQueue(&gDmaMesgQueue, gDmaMesgBuf, ARRAY_COUNT(gDmaMesgBuf));
osCreateMesgQueue(&gSPTaskMesgQueue, gSPTaskMesgBuf, ARRAY_COUNT(gSPTaskMesgBuf));
osCreateMesgQueue(&gIntrMesgQueue, gIntrMesgBuf, ARRAY_COUNT(gIntrMesgBuf));
- osViSetEvent(&gIntrMesgQueue, (OSMesg) MESG_VI_VBLANK, 1);
+ osViSetEvent(&gIntrMesgQueue, MESG_VI_VBLANK, 1);
osSetEventMesg(OS_EVENT_SP, &gIntrMesgQueue, (OSMesg) MESG_SP_COMPLETE);
osSetEventMesg(OS_EVENT_DP, &gIntrMesgQueue, (OSMesg) MESG_DP_COMPLETE);
}
@@ -273,24 +273,24 @@ void create_gfx_task_structure(void) {
gGfxSPTask->msg = (OSMesg) 2;
gGfxSPTask->task.t.type = M_GFXTASK;
gGfxSPTask->task.t.flags = OS_TASK_DP_WAIT;
- gGfxSPTask->task.t.ucode_boot = rspF3DBootStart;
- gGfxSPTask->task.t.ucode_boot_size = ((u8 *) rspF3DBootEnd - (u8 *) rspF3DBootStart);
+ // gGfxSPTask->task.t.ucode_boot = rspF3DBootStart;
+ // gGfxSPTask->task.t.ucode_boot_size = ((u8 *) rspF3DBootEnd - (u8 *) rspF3DBootStart);
// The split-screen multiplayer racing state uses F3DLX which has a simple subpixel calculation.
// Singleplayer race mode and all other game states use F3DEX.
// http://n64devkit.square7.ch/n64man/ucode/gspF3DEX.htm
- if (gGamestate != RACING || gPlayerCountSelection1 == 1) {
- gGfxSPTask->task.t.ucode = gspF3DEXTextStart;
- gGfxSPTask->task.t.ucode_data = gspF3DEXDataStart;
- } else {
- gGfxSPTask->task.t.ucode = gspF3DLXTextStart;
- gGfxSPTask->task.t.ucode_data = gspF3DLXDataStart;
- }
+ // if (gGamestate != RACING || gPlayerCountSelection1 == 1) {
+ // gGfxSPTask->task.t.ucode = gspF3DEXTextStart;
+ // gGfxSPTask->task.t.ucode_data = gspF3DEXDataStart;
+ // } else {
+ // gGfxSPTask->task.t.ucode = gspF3DLXTextStart;
+ // gGfxSPTask->task.t.ucode_data = gspF3DLXDataStart;
+ // }
gGfxSPTask->task.t.flags = 0;
gGfxSPTask->task.t.flags = OS_TASK_DP_WAIT;
- gGfxSPTask->task.t.ucode_size = SP_UCODE_SIZE;
- gGfxSPTask->task.t.ucode_data_size = SP_UCODE_DATA_SIZE;
+ // gGfxSPTask->task.t.ucode_size = SP_UCODE_SIZE;
+ // gGfxSPTask->task.t.ucode_data_size = SP_UCODE_DATA_SIZE;
gGfxSPTask->task.t.dram_stack = (u64 *) &gGfxSPTaskStack;
- gGfxSPTask->task.t.dram_stack_size = SP_DRAM_STACK_SIZE8;
+ // gGfxSPTask->task.t.dram_stack_size = SP_DRAM_STACK_SIZE8;
gGfxSPTask->task.t.output_buff = (u64 *) &gGfxSPTaskOutputBuffer;
gGfxSPTask->task.t.output_buff_size = (u64 *) ((u8 *) gGfxSPTaskOutputBuffer + sizeof(gGfxSPTaskOutputBuffer));
gGfxSPTask->task.t.data_ptr = (u64 *) gGfxPool->gfxPool;