big d_a_alink pass (#214)

* d_a_alink pass1 wip

* more d_a_alink work

* remove asm

* more daalink work

* 20% dol code decompiled

* fixed some nonmatchings for building

* a few daalink functions and labeling some HIO data
This commit is contained in:
TakaRikka
2022-12-19 11:06:32 -08:00
committed by GitHub
parent 1114b13da8
commit ca71275bbe
727 changed files with 15610 additions and 33013 deletions
+7 -6
View File
@@ -10,6 +10,7 @@
#include "JSystem/JKernel/JKRAramStream.h"
#include "JSystem/JKernel/JKRExpHeap.h"
#include "JSystem/JUtility/JUTException.h"
#include "MSL_C/string.h"
#include "dol2asm.h"
#include "dolphin/ar/ar.h"
#include "global.h"
@@ -28,7 +29,9 @@ extern "C" void mainRamToAram__7JKRAramFPUcUlUl15JKRExpandSwitchUlP7JKRHeapiPUl(
extern "C" void aramToMainRam__7JKRAramFUlPUcUl15JKRExpandSwitchUlP7JKRHeapiPUl();
extern "C" static void JKRDecompressFromAramToMainRam__FUlPvUlUlUlPUl();
extern "C" static void decompSZS_subroutine__FPUcPUc();
static int decompSZS_subroutine(u8* param_0, u8* param_1);
extern "C" static void firstSrcData__Fv();
static u8* firstSrcData(void);
extern "C" static void nextSrcData__FPUc();
extern "C" void __sinit_JKRAram_cpp();
extern "C" void func_802D2DF0(void* _this);
@@ -43,7 +46,6 @@ extern "C" u8 sAramObject__7JKRAram[4];
// External References:
//
SECTION_INIT void memcpy();
extern "C" void alloc__7JKRHeapFUliP7JKRHeap();
extern "C" void alloc__7JKRHeapFUli();
extern "C" void free__7JKRHeapFPvP7JKRHeap();
@@ -281,7 +283,7 @@ static u32 readCount;
static u32 maxDest;
/* 804513FC-80451400 0008FC 0004+00 1/1 0/0 0/0 .sbss None */
static u8 data_804513FC[4];
static bool data_804513FC;
/* 80451400-80451404 000900 0004+00 2/2 0/0 0/0 .sbss tsPtr */
static u32* tsPtr;
@@ -297,8 +299,7 @@ static u32 tsArea;
// doesn't use r13
void JKRDecompressFromAramToMainRam(u32 src, void* dst, u32 srcLength, u32 dstLength, u32 offset,
u32* resourceSize) {
#define s_is_decompress_mutex_initialized lbl_804513FC
#define decompMutex lbl_804343C0
#define s_is_decompress_mutex_initialized data_804513FC
// STATIC BEGIN
// This code is probably generated by the compiler for a static variable
@@ -311,7 +312,7 @@ void JKRDecompressFromAramToMainRam(u32 src, void* dst, u32 srcLength, u32 dstLe
// STATIC END
OSLockMutex(&decompMutex);
u32 szpSize = getSZSBufferSize();
u32 szpSize = JKRAram::getSZSBufferSize();
szpBuf = (u8*)JKRAllocFromSysHeap(szpSize, 0x20);
ASSERT(szpBuf != 0);
szpEnd = szpBuf + szpSize;
@@ -431,7 +432,7 @@ static u8* nextSrcData(u8* current) {
transLeft -= transSize;
if (transLeft == 0) {
srcLimit = (u32)(dest + left) + transSize;
srcLimit = (dest + left) + transSize;
}
return dest;