mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-15 03:20:35 +00:00
Naming some functions in libultra_code, decompiling a decent amount. (#77)
* osgetactivequeue ok * osspdevicebusy ok * osGetCurrFaultedThread ok * osSpRawStartDma OK * __osSpSetPc and osViGetCurrentFramebuffer OK * sinf, sins, and sptask OK * coss OK * cosf OK * ran format.sh * Updated PR to use ultratypes * osContStartQuery OK * ran format.sh * Updated PR to fix issues * Made suggested changes
This commit is contained in:
parent
4961eb0a90
commit
21750d5aee
47 changed files with 709 additions and 747 deletions
17
src/libultra_code/__osSpRawStartDma.c
Normal file
17
src/libultra_code/__osSpRawStartDma.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <ultra64/hardware.h>
|
||||
|
||||
s32 __osSpRawStartDma(s32 direction, u32 devAddr, void* dramAddr, u32 size) {
|
||||
if (__osSpDeviceBusy()) {
|
||||
return -1;
|
||||
}
|
||||
HW_REG(SP_MEM_ADDR_REG, u32) = devAddr;
|
||||
HW_REG(SP_DRAM_ADDR_REG, u32) = osVirtualToPhysical(dramAddr);
|
||||
if (direction == OS_READ) {
|
||||
HW_REG(SP_WR_LEN_REG, u32) = size - 1;
|
||||
} else {
|
||||
HW_REG(SP_RD_LEN_REG, u32) = size - 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue