start Pal WIP

This commit is contained in:
Banjo Kazooie
2024-09-04 01:30:42 -05:00
parent 98e97f4e95
commit 06e1330e71
17 changed files with 2936 additions and 188 deletions

View File

@@ -1,6 +1,8 @@
#include <ultra64.h>
#include "functions.h"
#include "variables.h"
#include "version.h"
OSIoMesg D_8027E090;
struct {
@@ -13,7 +15,7 @@ OSMesgQueue D_8027E108; //g_PimgrMesgQueue
void func_802405F0(u32 * arg0, s32 arg1, s32 size){
s32 block_cnt;
s32 block_remainder;
s32 block_size = 0x20000;
s32 block_size = VER_SELECT(0x20000, 0x8000, 0, 0);
int i;
osWritebackDCache(arg0, size);
@@ -21,10 +23,10 @@ void func_802405F0(u32 * arg0, s32 arg1, s32 size){
block_remainder = size % block_size;
for(i = 0; i < block_cnt; i++){
osPiStartDma(&D_8027E090, OS_MESG_PRI_NORMAL, OS_READ, arg1, arg0, 0x20000, &D_8027E0A8.queue);
osPiStartDma(&D_8027E090, OS_MESG_PRI_NORMAL, OS_READ, arg1, arg0, VER_SELECT(0x20000, 0x8000, 0, 0), &D_8027E0A8.queue);
osRecvMesg(&D_8027E0A8.queue, NULL, 1);
arg1 += 0x20000;
arg0 += 0x8000;
arg1 += VER_SELECT(0x20000, 0x8000, 0, 0);
arg0 += VER_SELECT(0x8000, 0x2000, 0, 0);
}
osPiStartDma(&D_8027E090, OS_MESG_PRI_NORMAL, OS_READ, arg1, arg0, block_remainder, &D_8027E0A8.queue);