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
@@ -4,10 +4,6 @@
#include "JSystem/JKernel/JKRDisposer/JKRDisposer.h"
#include "dolphin/types.h"
class JKRFileLoader;
extern JKRFileLoader* lbl_80451418; // JKRFileLoader::sCurrentVolume
extern JSUList<JKRFileLoader> lbl_80434354; // JKRFileLoader::sVolumeList
class JKRFileFinder;
class JKRFileLoader : public JKRDisposer {
public:
@@ -42,16 +38,19 @@ protected:
/* 0x34 */ u32 mMountCount;
public:
static void* getGlbResource(char const*);
static void* getGlbResource(char const*, JKRFileLoader*);
static void* getGlbResource(const char*);
static void* getGlbResource(const char*, JKRFileLoader*);
static bool removeResource(void*, JKRFileLoader*);
static bool detachResource(void*, JKRFileLoader*);
static JKRFileLoader* findVolume(char const**);
static const char* fetchVolumeName(char*, long, char const*);
static JKRFileLoader* findVolume(const char**);
static const char* fetchVolumeName(char*, long, const char*);
static JKRFileLoader* getCurrentVolume() { return lbl_80451418; }
static void setCurrentVolume(JKRFileLoader* fileLoader) { lbl_80451418 = fileLoader; }
static JSUList<JKRFileLoader>& getVolumeList() { return lbl_80434354; }
static JKRFileLoader* getCurrentVolume() { return sCurrentVolume; }
static void setCurrentVolume(JKRFileLoader* fileLoader) { sCurrentVolume = fileLoader; }
static JSUList<JKRFileLoader>& getVolumeList() { return sVolumeList; }
static JKRFileLoader* sCurrentVolume;
static JSUList<JKRFileLoader> sVolumeList;
};
#endif
@@ -11,11 +11,11 @@
/* 802D4168 002D10A8 3C 60 80 3D */ lis r3, lbl_803CC1C8@ha
/* 802D416C 002D10AC 38 03 C1 C8 */ addi r0, r3, lbl_803CC1C8@l
/* 802D4170 002D10B0 90 1E 00 00 */ stw r0, 0(r30)
/* 802D4174 002D10B4 80 0D 8E 98 */ lwz r0, lbl_80451418-_SDA_BASE_(r13)
/* 802D4174 002D10B4 80 0D 8E 98 */ lwz r0, sCurrentVolume__13JKRFileLoader-_SDA_BASE_(r13)
/* 802D4178 002D10B8 7C 00 F0 40 */ cmplw r0, r30
/* 802D417C 002D10BC 40 82 00 0C */ bne lbl_802D4188
/* 802D4180 002D10C0 38 00 00 00 */ li r0, 0
/* 802D4184 002D10C4 90 0D 8E 98 */ stw r0, lbl_80451418-_SDA_BASE_(r13)
/* 802D4184 002D10C4 90 0D 8E 98 */ stw r0, sCurrentVolume__13JKRFileLoader-_SDA_BASE_(r13)
lbl_802D4188:
/* 802D4188 002D10C8 34 1E 00 18 */ addic. r0, r30, 0x18
/* 802D418C 002D10CC 41 82 00 10 */ beq lbl_802D419C
@@ -18,8 +18,8 @@
/* 802D42AC 002D11EC 4E 80 04 21 */ bctrl
/* 802D42B0 002D11F0 48 00 00 40 */ b lbl_802D42F0
lbl_802D42B4:
/* 802D42B4 002D11F4 3C 80 80 43 */ lis r4, lbl_80434354@ha
/* 802D42B8 002D11F8 83 E4 43 54 */ lwz r31, lbl_80434354@l(r4)
/* 802D42B4 002D11F4 3C 80 80 43 */ lis r4, sVolumeList__13JKRFileLoader@ha
/* 802D42B8 002D11F8 83 E4 43 54 */ lwz r31, sVolumeList__13JKRFileLoader@l(r4)
/* 802D42BC 002D11FC 48 00 00 2C */ b lbl_802D42E8
lbl_802D42C0:
/* 802D42C0 002D1200 80 7F 00 00 */ lwz r3, 0(r31)
@@ -16,8 +16,8 @@
/* 802D433C 002D127C 4E 80 04 21 */ bctrl
/* 802D4340 002D1280 48 00 00 48 */ b lbl_802D4388
lbl_802D4344:
/* 802D4344 002D1284 3C 60 80 43 */ lis r3, lbl_80434354@ha
/* 802D4348 002D1288 83 E3 43 54 */ lwz r31, lbl_80434354@l(r3)
/* 802D4344 002D1284 3C 60 80 43 */ lis r3, sVolumeList__13JKRFileLoader@ha
/* 802D4348 002D1288 83 E3 43 54 */ lwz r31, sVolumeList__13JKRFileLoader@l(r3)
/* 802D434C 002D128C 48 00 00 30 */ b lbl_802D437C
lbl_802D4350:
/* 802D4350 002D1290 80 7F 00 00 */ lwz r3, 0(r31)
@@ -16,8 +16,8 @@
/* 802D43D4 002D1314 4E 80 04 21 */ bctrl
/* 802D43D8 002D1318 48 00 00 48 */ b lbl_802D4420
lbl_802D43DC:
/* 802D43DC 002D131C 3C 60 80 43 */ lis r3, lbl_80434354@ha
/* 802D43E0 002D1320 83 E3 43 54 */ lwz r31, lbl_80434354@l(r3)
/* 802D43DC 002D131C 3C 60 80 43 */ lis r3, sVolumeList__13JKRFileLoader@ha
/* 802D43E0 002D1320 83 E3 43 54 */ lwz r31, sVolumeList__13JKRFileLoader@l(r3)
/* 802D43E4 002D1324 48 00 00 30 */ b lbl_802D4414
lbl_802D43E8:
/* 802D43E8 002D1328 80 7F 00 00 */ lwz r3, 0(r31)
@@ -9,15 +9,15 @@
/* 802D4450 002D1390 88 05 00 00 */ lbz r0, 0(r5)
/* 802D4454 002D1394 2C 00 00 2F */ cmpwi r0, 0x2f
/* 802D4458 002D1398 41 82 00 0C */ beq lbl_802D4464
/* 802D445C 002D139C 80 6D 8E 98 */ lwz r3, lbl_80451418-_SDA_BASE_(r13)
/* 802D445C 002D139C 80 6D 8E 98 */ lwz r3, sCurrentVolume__13JKRFileLoader-_SDA_BASE_(r13)
/* 802D4460 002D13A0 48 00 00 50 */ b lbl_802D44B0
lbl_802D4464:
/* 802D4464 002D13A4 38 61 00 08 */ addi r3, r1, 8
/* 802D4468 002D13A8 38 80 01 01 */ li r4, 0x101
/* 802D446C 002D13AC 48 00 00 59 */ bl fetchVolumeName__13JKRFileLoaderFPclPCc
/* 802D4470 002D13B0 90 7F 00 00 */ stw r3, 0(r31)
/* 802D4474 002D13B4 3C 60 80 43 */ lis r3, lbl_80434354@ha
/* 802D4478 002D13B8 83 E3 43 54 */ lwz r31, lbl_80434354@l(r3)
/* 802D4474 002D13B4 3C 60 80 43 */ lis r3, sVolumeList__13JKRFileLoader@ha
/* 802D4478 002D13B8 83 E3 43 54 */ lwz r31, sVolumeList__13JKRFileLoader@l(r3)
/* 802D447C 002D13BC 48 00 00 28 */ b lbl_802D44A4
lbl_802D4480:
/* 802D4480 002D13C0 80 9F 00 00 */ lwz r4, 0(r31)
@@ -3,11 +3,11 @@
/* 802D45A0 002D14E0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 802D45A4 002D14E4 7C 08 02 A6 */ mflr r0
/* 802D45A8 002D14E8 90 01 00 14 */ stw r0, 0x14(r1)
/* 802D45AC 002D14EC 3C 60 80 43 */ lis r3, lbl_80434354@ha
/* 802D45B0 002D14F0 38 63 43 54 */ addi r3, r3, lbl_80434354@l
/* 802D45AC 002D14EC 3C 60 80 43 */ lis r3, sVolumeList__13JKRFileLoader@ha
/* 802D45B0 002D14F0 38 63 43 54 */ addi r3, r3, sVolumeList__13JKRFileLoader@l
/* 802D45B4 002D14F4 48 00 79 61 */ bl initiate__10JSUPtrListFv
/* 802D45B8 002D14F8 3C 60 80 43 */ lis r3, lbl_80434354@ha
/* 802D45BC 002D14FC 38 63 43 54 */ addi r3, r3, lbl_80434354@l
/* 802D45B8 002D14F8 3C 60 80 43 */ lis r3, sVolumeList__13JKRFileLoader@ha
/* 802D45BC 002D14FC 38 63 43 54 */ addi r3, r3, sVolumeList__13JKRFileLoader@l
/* 802D45C0 002D1500 3C 80 80 2D */ lis r4, JSUList_NS_dtor_X6_@ha
/* 802D45C4 002D1504 38 84 45 E4 */ addi r4, r4, JSUList_NS_dtor_X6_@l
/* 802D45C8 002D1508 3C A0 80 43 */ lis r5, lbl_80434348@ha