mirror of https://github.com/zeldaret/mm.git
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>
This commit is contained in:
parent
285381e662
commit
987566eebe
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue