match JKRDecomp for release

Thanks Celisium!
This commit is contained in:
SwareJonge 2023-04-29 14:46:38 +02:00
parent 8883b3a925
commit 9ee01f8292
6 changed files with 8 additions and 18 deletions

View File

@ -51,10 +51,10 @@ libs/JSystem/JKernel/JKRArchivePub.cpp:
.text: [0x8000db44, 0x8000e554]
.data: [0x80347bd8, 0x80347c28]
#libs/JSystem/JKernel/JKRDecomp.cpp:
#.text: [0x8000f2ec, 0x8000fa00]
#.data: [0x80347c78, 0x80347cc8]
#.sbss: [0x803d49f0, 0x803d49f8]
libs/JSystem/JKernel/JKRDecomp.cpp:
.text: [0x8000f2ec, 0x8000fa00]
.data: [0x80347c78, 0x80347cc8]
.sbss: [0x803d49f0, 0x803d49f8]
libs/JSystem/JKernel/JKRDisposer.cpp:
.text: [0x8000fa00, 0x8000faec]

View File

@ -1,6 +0,0 @@
#ifndef RUNTIME_H
#define RUNTIME_H
extern "C" unsigned long __cvt_fp2unsigned(double d);
#endif

View File

@ -106,14 +106,12 @@ void JKRDecomp::decode(u8 *src, u8 *dst, u32 srcSize, u32 dstSize) {
decodeSZS(src, dst, srcSize, dstSize);
}
// doesn't match for release(regswaps, loads dstOffset before decodedSize and such)
void JKRDecomp::decodeSZP(u8 *src, u8 *dst, u32 srcLength, u32 dstLength)
{
// int superior
int srcChunkOffset;
int count;
int dstOffset;
u32 length;
u32 length = srcLength;
int linkInfo;
int offset;
int i;
@ -123,7 +121,7 @@ void JKRDecomp::decodeSZP(u8 *src, u8 *dst, u32 srcLength, u32 dstLength)
int srcDataOffset = READU32_BE(src, 12);
dstOffset = 0;
u32 counter = 0; // curently counter gets assembled before the READ_U32 operations
u32 counter = 0;
srcChunkOffset = 16;
u32 chunkBits;
@ -132,7 +130,6 @@ void JKRDecomp::decodeSZP(u8 *src, u8 *dst, u32 srcLength, u32 dstLength)
if (dstLength > decodedSize)
return;
length = srcLength;
do
{
if (counter == 0)
@ -172,10 +169,10 @@ void JKRDecomp::decodeSZP(u8 *src, u8 *dst, u32 srcLength, u32 dstLength)
else
count += 2;
if ((int)count > decodedSize - dstOffset)
if (count > decodedSize - dstOffset)
count = decodedSize - dstOffset;
for (i = 0; i < (int)count; i++, dstOffset++, offset++)
for (i = 0; i < count; i++, dstOffset++, offset++)
{
if (dstLength == 0)
{

0
tools/1.2.5e/.gitkeep Normal file
View File

View File

@ -1 +0,0 @@
This version is not a real version but an edited CW 1.2.5 compiler. This performs the profile hack found by EpochFlame intended to be used with frank.py.

0
tools/1.3.2/.gitkeep Normal file
View File