diff options
| author | EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> | 2021-11-11 20:45:53 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-11 17:45:53 -0300 |
| commit | 987566eebe346f9dea1a2ca9db4cf5bc0c97a797 (patch) | |
| tree | 6103129f4b1b3391aefcadbe74ef77f79357e745 /src | |
| parent | 285381e6627f23e78e783d0274612856a0bd357b (diff) | |
pfsselectbank OK (#420)
* pfsselectbank OK
* Update src/libultra/io/pfsselectbank.c
Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/libultra/io/pfsselectbank.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/libultra/io/pfsselectbank.c b/src/libultra/io/pfsselectbank.c index 8353dc43c..6cc43a470 100644 --- a/src/libultra/io/pfsselectbank.c +++ b/src/libultra/io/pfsselectbank.c @@ -1,3 +1,18 @@ +#include "PR/pfs.h" #include "global.h" -#pragma GLOBAL_ASM("asm/non_matchings/boot/pfsselectbank/__osPfsSelectBank.s") +s32 __osPfsSelectBank(OSPfs* pfs, u8 bank) { + u8 buf[BLOCKSIZE]; + s32 i; + s32 ret = 0; + + for (i = 0; i < BLOCKSIZE; i++) { + buf[i] = bank; + } + + ret = __osContRamWrite(pfs->queue, pfs->channel, 0x8000 / BLOCKSIZE, buf, 0); + if (ret == 0) { + pfs->activebank = bank; + } + return ret; +} |
