1
0
Fork 0
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:
Lucas Shaw 2020-04-18 18:40:27 -07:00 committed by GitHub
parent 4961eb0a90
commit 21750d5aee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 709 additions and 747 deletions

View 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;
}