JKRAram and JKRAramStream (#80)

* before __register_global_object

* JKRThread::sThreadList, JKRHeap::sSystemHeap, etc.

* cleanup and started on JKRDvdArchive

* before changing JKRCompression

* more JKRDvdArchive, abs, and memset

* fixed JKRArchive::setExpandSize split

* JKRArchive::sCurrentDirID, JKRDvdFile::sDvdList, and matching JKRDvdFile constructors

* problems

* merge fixes and formatting

* updated clang version in clang-format-all to version 10

* Added OSPhysicalToCached and struct for global memory

* remove useless __attribute__

* changed from defines and macros to const variable and function

* changed FLAG_HAS to FLAG_ON

* JKRAram, linking problems

* fix JKRAram

* remove nonmatching stuff

* renamed static data

* more static class members

* JKRAramStream OK

* formatting

Co-authored-by: Julgodis <>
Co-authored-by: Pheenoh <pheenoh@gmail.com>
This commit is contained in:
Jonathan Wase
2021-01-10 02:15:52 +01:00
committed by GitHub
parent 3e498a531d
commit 04354aadb9
255 changed files with 2048 additions and 3354 deletions
+6 -7
View File
@@ -1,7 +1,6 @@
#include "JSystem/JKernel/JKRDecomp/JKRDecomp.h"
#include "global.h"
#include "JSystem/JKernel/JKRAramPiece/JKRAramPiece.h"
#include "global.h"
JKRDecomp* JKRDecomp::create(long priority) {
if (!lbl_804514B0) {
@@ -114,9 +113,9 @@ void JKRDecomp::decodeSZP(u8* src, u8* dst, u32 srcLength, u32 dstLength) {
s32 offset;
s32 i;
decodedSize = READ_BIG_ENDIAN_U32(src + 4);
linkTableOffset = READ_BIG_ENDIAN_U32(src + 8);
srcDataOffset = READ_BIG_ENDIAN_U32(src + 12);
decodedSize = read_big_endian_u32(src + 4);
linkTableOffset = read_big_endian_u32(src + 8);
srcDataOffset = read_big_endian_u32(src + 12);
dstOffset = 0;
counter = 0;
@@ -131,7 +130,7 @@ void JKRDecomp::decodeSZP(u8* src, u8* dst, u32 srcLength, u32 dstLength) {
length = srcLength;
do {
if (counter == 0) {
chunkBits = READ_BIG_ENDIAN_U32(src + srcChunkOffset);
chunkBits = read_big_endian_u32(src + srcChunkOffset);
srcChunkOffset += 4;
counter = 32;
}
@@ -149,7 +148,7 @@ void JKRDecomp::decodeSZP(u8* src, u8* dst, u32 srcLength, u32 dstLength) {
dstOffset++;
srcDataOffset++;
} else {
u32 linkInfo = READ_BIG_ENDIAN_U16(src + linkTableOffset);
u32 linkInfo = read_big_endian_u16(src + linkTableOffset);
linkTableOffset += 2;
offset = dstOffset - (linkInfo & 0xFFF);