mirror of
https://github.com/zeldaret/oot
synced 2026-06-22 00:46:38 -04:00
7e195a3562
* osPfsIsPlug.c and osContSetCh.c OK * update * __osPfsGetStatus.c OK * removed unused asm * Updated all libultra controller files to use new structs instead of the temporary structs. Added os_pfs.h * controller updates * fixed header guard * Made suggested changes * guLookAt.c OK * commit * __osPfsSelectBank.c OK * osPfsDeleteFile.c OK * pfsreadwritefile.c OK * osPfsFreeBlocks.c OK * cleaned up ospfsfreeblocks * started pfsinitpak.c * pfsallocatefile.c OK * contpfs.c decompiled with 1 non matching * osPfsFindFile.c OK * pfsinitpak.c decompiled. one non-matching * Actually fixed merge conflict * sins.c OK * cosf.c sinf.c and sins.c OK * moved osAfterPreNMI to its own file. Renamed code_801031F0 to contquery.c * pfschecker.c OK * final update and rename * Removed makefile testing thing that i accidentally added * Made suggested changes
19 lines
372 B
C
19 lines
372 B
C
#include <ultra64/pfs.h>
|
|
#include <global.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;
|
|
}
|