blob: 1c891385468afadf6ba94d91b2955eae51ab881f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include "ultra64/pfs.h"
#include "ultra64.h"
s32 __osPfsSelectBank(OSPfs* pfs, u8 bank) {
u8 temp[BLOCKSIZE];
s32 i;
s32 ret = 0;
for (i = 0; i < BLOCKSIZE; i++) {
temp[i] = bank;
}
ret = __osContRamWrite(pfs->queue, pfs->channel, 0x8000 / BLOCKSIZE, temp, 0);
if (ret == 0) {
pfs->activebank = bank;
}
return ret;
}
|