diff --git a/CMakeLists.txt b/CMakeLists.txt index 8cad7a928..cd11f4574 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,13 +91,12 @@ include_directories( ) # Collect source files to build the executable -file(GLOB ALL_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} +file(GLOB ALL_FILES_ROOT RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.c" "src/*.h" ) file(GLOB_RECURSE ALL_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - "src/*" "src/buffers/*.c" "src/buffers/*.h" "src/data/*.c" @@ -116,6 +115,8 @@ file(GLOB_RECURSE ALL_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "assets/code" ) +list(APPEND ALL_FILES ${ALL_FILES_ROOT}) + # Exclude specific files from the ALL_FILES list list(FILTER ALL_FILES EXCLUDE REGEX ".*.inc.c") list(FILTER ALL_FILES EXCLUDE REGEX "./src/debug/crash_screen_enhancement.c") diff --git a/asm/os/parameters.s b/asm/os/parameters.s index f561f175d..0bdf0ee86 100644 --- a/asm/os/parameters.s +++ b/asm/os/parameters.s @@ -17,7 +17,7 @@ nop .endif .text -gsymbol osTvType 0x80000300 +# gsymbol osTvType 0x80000300 gsymbol osRomType 0x80000304 gsymbol osRomBase 0x80000308 gsymbol osResetType 0x8000030C diff --git a/include/mk64.h b/include/mk64.h index ea1a65b63..02fdeb9f3 100644 --- a/include/mk64.h +++ b/include/mk64.h @@ -1,6 +1,8 @@ #ifndef MK64_H #define MK64_H +#include + /** * @file mk64.h * Global header for mk64 diff --git a/include/stubs.h b/include/stubs.h index fce97e583..c8fa8fdfa 100644 --- a/include/stubs.h +++ b/include/stubs.h @@ -4,4 +4,4 @@ extern u32 osTvType = OS_TV_NTSC; extern u32 osResetType; -extern u8 osAppNmiBuffer[64]; \ No newline at end of file +extern u8 osAppNmiBuffer[64]; diff --git a/src/main.c b/src/main.c index 1600198a0..8cef2fe08 100644 --- a/src/main.c +++ b/src/main.c @@ -3,6 +3,7 @@ #endif #include #include +#include #include #include #include @@ -248,9 +249,9 @@ 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, MESG_VI_VBLANK, 1); - osSetEventMesg(OS_EVENT_SP, &gIntrMesgQueue, (OSMesg) MESG_SP_COMPLETE); - osSetEventMesg(OS_EVENT_DP, &gIntrMesgQueue, (OSMesg) MESG_DP_COMPLETE); + osViSetEvent(&gIntrMesgQueue, OS_MESG_32(MESG_VI_VBLANK), 1); + osSetEventMesg(OS_EVENT_SP, &gIntrMesgQueue, OS_MESG_32(MESG_SP_COMPLETE)); + osSetEventMesg(OS_EVENT_DP, &gIntrMesgQueue, OS_MESG_32(MESG_DP_COMPLETE)); } void start_sptask(s32 taskType) { diff --git a/src/stubs.c b/src/stubs.c index 811994644..8e78a7a6c 100644 --- a/src/stubs.c +++ b/src/stubs.c @@ -6,4 +6,4 @@ u32 osTvType = OS_TV_NTSC; u32 osResetType; -u8 osAppNmiBuffer[64]; \ No newline at end of file +u8 osAppNmiBuffer[64];