mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Add more files to the os folder that belong there
This commit is contained in:
@@ -263,9 +263,7 @@ $(BUILD_DIR)/lib/src/os/osCreatePiManager.o: OPT_FLAGS := -O2
|
||||
$(BUILD_DIR)/lib/src/printf.o : OPT_FLAGS := -O3
|
||||
$(BUILD_DIR)/lib/src/unknown_0C91A0.o : OPT_FLAGS := -O1
|
||||
$(BUILD_DIR)/lib/src/unknown_0D29F0.o: OPT_FLAGS := -O1
|
||||
$(BUILD_DIR)/lib/src/unknown_0D3160.o: OPT_FLAGS := -O1
|
||||
$(BUILD_DIR)/lib/src/unknown_0D3360.o: OPT_FLAGS := -O1
|
||||
$(BUILD_DIR)/lib/src/unknown_0D5EC0.o: OPT_FLAGS := -O1
|
||||
$(BUILD_DIR)/lib/src/unknown_0C9C90.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0
|
||||
|
||||
$(BUILD_DIR)/lib/%.o: MIPSISET := -mips2
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/* The comment below is needed for this file to be picked up by generate_ld */
|
||||
/* RAM_POS: 0x800D2680 */
|
||||
|
||||
#include "types.h"
|
||||
#include "macros.h"
|
||||
#include "libultra_internal.h"
|
||||
#include "PR/rcp.h"
|
||||
#include "osVirtualToPhysical.h"
|
||||
|
||||
s32 osEPiRawStartDma(OSPiHandle *pihandle, s32 dir, u32 cart_addr, void *dram_addr, u32 size) {
|
||||
register int status;
|
||||
|
||||
status = IO_READ(PI_STATUS_REG);
|
||||
|
||||
while (status & PI_STATUS_ERROR) {
|
||||
status = IO_READ(PI_STATUS_REG);
|
||||
}
|
||||
|
||||
IO_WRITE(PI_DRAM_ADDR_REG, osVirtualToPhysical(dram_addr));
|
||||
IO_WRITE(PI_CART_ADDR_REG, K1_TO_PHYS(pihandle->baseAddress | cart_addr));
|
||||
|
||||
switch (dir) {
|
||||
case OS_READ:
|
||||
IO_WRITE(PI_WR_LEN_REG, size - 1);
|
||||
break;
|
||||
case OS_WRITE:
|
||||
IO_WRITE(PI_RD_LEN_REG, size - 1);
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/* The comment below is needed for this file to be picked up by generate_ld */
|
||||
/* RAM_POS: 0x800D2560 */
|
||||
|
||||
#include "macros.h"
|
||||
|
||||
//To the best of my knowledge these files can never actually be decompiled
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osDisableInt.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osRestoreInt.s")
|
||||
@@ -1,14 +1,11 @@
|
||||
/* The comment below is needed for this file to be picked up by generate_ld */
|
||||
/* RAM_POS: 0x800D2560 */
|
||||
/* RAM_POS: 0x800D25a0 */
|
||||
|
||||
#include "types.h"
|
||||
#include "macros.h"
|
||||
#include "libultra_internal.h"
|
||||
#include "PR/rcp.h"
|
||||
#include "os/osVirtualToPhysical.h"
|
||||
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osDisableInt.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osRestoreInt.s")
|
||||
#include "osVirtualToPhysical.h"
|
||||
|
||||
s32 osPiRawStartDma(s32 direction, u32 devAddr, void *dramAddr, u32 size) {
|
||||
register int status;
|
||||
@@ -33,29 +30,3 @@ s32 osPiRawStartDma(s32 direction, u32 devAddr, void *dramAddr, u32 size) {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 osEPiRawStartDma(OSPiHandle *pihandle, s32 dir, u32 cart_addr, void *dram_addr, u32 size) {
|
||||
register int status;
|
||||
|
||||
status = IO_READ(PI_STATUS_REG);
|
||||
|
||||
while (status & PI_STATUS_ERROR) {
|
||||
status = IO_READ(PI_STATUS_REG);
|
||||
}
|
||||
|
||||
IO_WRITE(PI_DRAM_ADDR_REG, osVirtualToPhysical(dram_addr));
|
||||
IO_WRITE(PI_CART_ADDR_REG, K1_TO_PHYS(pihandle->baseAddress | cart_addr));
|
||||
|
||||
switch (dir) {
|
||||
case OS_READ:
|
||||
IO_WRITE(PI_WR_LEN_REG, size - 1);
|
||||
break;
|
||||
case OS_WRITE:
|
||||
IO_WRITE(PI_RD_LEN_REG, size - 1);
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -118,4 +118,4 @@ void viMgrMain(void *arg) {
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("lib/asm/non_matchings/osViMgr_0D2590/viMgrMain.s")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -127,7 +127,7 @@ void osSpTaskLoad(OSTask *intp){
|
||||
;
|
||||
}
|
||||
|
||||
void osSpTaskStartGo(OSTask *tp){
|
||||
void osSpTaskStartGo(OSTask *tp) {
|
||||
while (__osSpDeviceBusy());
|
||||
|
||||
__osSpSetStatus(SP_SET_INTR_BREAK | SP_CLR_SSTEP | SP_CLR_BROKE | SP_CLR_HALT);
|
||||
|
||||
Reference in New Issue
Block a user