Jsystem work (#399)

* Almost match JASBasicInst

* JASDrumSet OK

* Some JAudio2 struct adjustment

* Match JKRHeap::callAllDisposer

* JAISe OK

* Fix setAutoDelete

* JAISound OK

* Match a few functions in linklist

* Few matches in d_a_e_ym

* JUTTexture OK

* Work on JUTGamePad

* Import JUTResource

* Work on JUTResFont::getFontCode
This commit is contained in:
hatal175
2023-08-06 06:12:26 +03:00
committed by GitHub
parent 8b34c0210f
commit dc985026fa
79 changed files with 519 additions and 2705 deletions
+6
View File
@@ -342,6 +342,12 @@ void* JKRExpHeap::allocFromHead(u32 size, int align) {
} else {
CMemBlock* prev = foundBlock->mPrev;
CMemBlock* next = foundBlock->mNext;
// Works but very fake match
/*size = (u32)foundBlock->allocFore(size, mCurrentGroupId, 0, 0, 0);
removeFreeBlock(foundBlock);
if (size) {
setFreeBlock((CMemBlock*)size, prev, next);
}*/
newFreeBlock = foundBlock->allocFore(size, mCurrentGroupId, 0, 0, 0);
removeFreeBlock(foundBlock);
if (newFreeBlock) {
+1 -13
View File
@@ -188,25 +188,13 @@ void JKRHeap::free(void* ptr) {
}
/* 802CE574-802CE5CC 2C8EB4 0058+00 1/0 5/2 0/0 .text callAllDisposer__7JKRHeapFv */
// missing stack var
#ifdef NONMATCHING
void JKRHeap::callAllDisposer() {
JSUListIterator<JKRDisposer> iterator;
while (iterator = mDisposerList.getFirst(), iterator != mDisposerList.getEnd()) {
while ((iterator = mDisposerList.getFirst()) != mDisposerList.getEnd()) {
iterator->~JKRDisposer();
}
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void JKRHeap::callAllDisposer() {
nofralloc
#include "asm/JSystem/JKernel/JKRHeap/callAllDisposer__7JKRHeapFv.s"
}
#pragma pop
#endif
/* 802CE5CC-802CE5F8 2C8F0C 002C+00 0/0 12/12 0/0 .text freeAll__7JKRHeapFv */
void JKRHeap::freeAll() {