diff options
| author | hatal175 <hatal175@users.noreply.github.com> | 2023-08-06 06:12:26 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-05 21:12:26 -0600 |
| commit | dc985026fa6545bede38d841b7100eceb34e97e4 (patch) | |
| tree | 2cc4ea27185775862f14ca64a5e99d401046f40f /libs/JSystem/JKernel | |
| parent | 8b34c0210f686db96979c9a36aea45e6dda7169a (diff) | |
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
Diffstat (limited to 'libs/JSystem/JKernel')
| -rw-r--r-- | libs/JSystem/JKernel/JKRExpHeap.cpp | 6 | ||||
| -rw-r--r-- | libs/JSystem/JKernel/JKRHeap.cpp | 14 |
2 files changed, 7 insertions, 13 deletions
diff --git a/libs/JSystem/JKernel/JKRExpHeap.cpp b/libs/JSystem/JKernel/JKRExpHeap.cpp index 610308db4e..674095a13d 100644 --- a/libs/JSystem/JKernel/JKRExpHeap.cpp +++ b/libs/JSystem/JKernel/JKRExpHeap.cpp @@ -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) { diff --git a/libs/JSystem/JKernel/JKRHeap.cpp b/libs/JSystem/JKernel/JKRHeap.cpp index 7001124419..95cc62e80e 100644 --- a/libs/JSystem/JKernel/JKRHeap.cpp +++ b/libs/JSystem/JKernel/JKRHeap.cpp @@ -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() { |
