Types and functions for JKRThread, JKRFile, JKRDvdFile, JKRFileCache... (#17)

* Added JSUListIterator and decompiled JKRHeap::dispose_subroutine

* JKRDisposer!

* only 4 functions not OK in JKRHeap

* JKRThread asm functions

* more JKRThread

* JKRThreadSwitch

* JKRThread::JKRThread

* More JKRTHread functions and vtable

* fixed bad merge

* update JKRThread and JKRThreadSwitch to use new virtual inheritance

* save before asmsplit.py script

* JKRFile

* JKRDvdFile

* JKRFileCache

* JKRFileFinder

* JKRFileLoader

* JKRAssertHeap

* JKRExpHeap

* JKRSolidHeap

* fixed type and functions definitions

* JKRArchive (Pub)

* missed file

* JKRArchive

* forgot obj_files.mk

* fixed merge error and class members

* class members

* removed unused asm files

* added names to global variables

* class members for JKRHeap, JKRExpHeap, JKRSolidHeap, and JKRFileCache.
This commit is contained in:
Jonathan Wase
2020-12-05 18:45:10 +01:00
committed by GitHub
parent 3dc3739ebd
commit fb1217e3f9
299 changed files with 9551 additions and 4958 deletions
+79 -1
View File
@@ -1 +1,79 @@
// ok
#include "JSystem/JKernel/JKRArchive/JKRArchive.h"
#include "global.h"
asm JKRArchive::JKRArchive(long, JKRArchive::EMountMode) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D6294.s"
}
asm JKRArchive::~JKRArchive() {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D6334.s"
}
asm void JKRArchive::isSameName(JKRArchive::CArcName&, u32, unsigned short) const {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D6394.s"
}
asm void JKRArchive::findResType(u32) const {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D63E0.s"
}
asm void JKRArchive::findDirectory(char const*, u32) const {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D641C.s"
}
asm void JKRArchive::findTypeResource(u32, char const*) const {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D64F4.s"
}
asm void JKRArchive::findFsResource(char const*, u32) const {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D65A4.s"
}
asm void JKRArchive::findIdxResource(u32) const {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D6684.s"
}
asm void JKRArchive::findNameResource(char const*) const {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D66AC.s"
}
asm void JKRArchive::findPtrResource(void const*) const {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D6734.s"
}
asm void JKRArchive::findIdResource(unsigned short) const {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D6770.s"
}
asm void JKRArchive::CArcName::store(char const*) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D67F4.s"
}
asm const char* JKRArchive::CArcName::store(char const*, char) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D6884.s"
}
#if 0
asm void JKRArchive::setExpandSize(JKRArchive::SDIFileEntry*, u32) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D693C.s"
}
asm void JKRArchive::getExpandSize(JKRArchive::SDIFileEntry*) const {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D6978.s"
}
#endif
+117 -1
View File
@@ -1 +1,117 @@
// ok
#include "JSystem/JKernel/JKRArchive/JKRArchive.h"
#include "global.h"
asm void JKRArchive::check_mount_already(long, JKRHeap*) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D5778.s"
}
asm void JKRArchive::mount(char const*, JKRArchive::EMountMode, JKRHeap*, JKRArchive::EMountDirection) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D57E4.s"
}
asm void JKRArchive::mount(void*, JKRHeap*, JKRArchive::EMountDirection) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D5840.s"
}
asm void JKRArchive::mount(long, JKRArchive::EMountMode, JKRHeap*, JKRArchive::EMountDirection) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D58C8.s"
}
asm void JKRArchive::becomeCurrent(char const*) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D5A38.s"
}
asm bool JKRArchive::getDirEntry(JKRArchive::SDirEntry*, u32) const {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D5AC0.s"
}
asm void JKRArchive::getGlbResource(u32, char const*, JKRArchive*) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D5B38.s"
}
asm void JKRArchive::getResource(char const*) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D5BE8.s"
}
asm void JKRArchive::getResource(u32, char const*) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D5C64.s"
}
asm void JKRArchive::getIdxResource(u32) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D5CE4.s"
}
asm void JKRArchive::getResource(unsigned short) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D5D38.s"
}
asm void JKRArchive::readResource(void*, u32, u32, char const*) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D5D8C.s"
}
asm void JKRArchive::readResource(void*, u32, char const*) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D5E30.s"
}
asm void JKRArchive::readIdxResource(void*, u32, u32) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D5ECC.s"
}
asm void JKRArchive::readResource(void*, u32, unsigned short) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D5F40.s"
}
asm void JKRArchive::removeResourceAll(void) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D5FB4.s"
}
asm void JKRArchive::removeResource(void*) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D603C.s"
}
asm void JKRArchive::detachResource(void*) {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D609C.s"
}
asm void JKRArchive::getResSize(void const*) const {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D60D8.s"
}
asm void JKRArchive::countResource(void) const {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D610C.s"
}
asm void JKRArchive::countFile(char const*) const {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D6150.s"
}
asm void JKRArchive::getFirstFile(char const*) const {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D61B0.s"
}
asm void JKRArchive::getFileAttribute(u32) const {
nofralloc
#include "JSystem/JKernel/JKRArchive/asm/func_802D625C.s"
}
+102 -1
View File
@@ -1 +1,102 @@
// ok
#include "JSystem/JKernel/JKRAssertHeap/JKRAssertHeap.h"
#include "global.h"
asm JKRAssertHeap::JKRAssertHeap(void*, unsigned long, JKRHeap*, bool) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D12C4.s"
}
asm JKRAssertHeap::~JKRAssertHeap() {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D1300.s"
}
asm void JKRAssertHeap::create(JKRHeap*) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D1368.s"
}
asm void JKRAssertHeap::do_destroy(void) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D13D8.s"
}
asm u32 JKRAssertHeap::getHeapType(void) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D1408.s"
}
asm bool JKRAssertHeap::check(void) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D1414.s"
}
asm bool JKRAssertHeap::dump(void) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D141C.s"
}
asm void JKRAssertHeap::dump_sort(void) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D1424.s"
}
asm u8 JKRAssertHeap::do_changeGroupID(u8 param_1) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D142C.s"
}
asm u8 JKRAssertHeap::do_getCurrentGroupId(void) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D1434.s"
}
asm void* JKRAssertHeap::do_alloc(u32, int) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D143C.s"
}
asm void JKRAssertHeap::do_free(void*) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D1444.s"
}
asm void JKRAssertHeap::do_freeAll(void) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D1448.s"
}
asm void JKRAssertHeap::do_freeTail(void) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D144C.s"
}
asm void JKRAssertHeap::do_fillFreeArea(void) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D1450.s"
}
asm s32 JKRAssertHeap::do_resize(void*, u32) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D1454.s"
}
asm s32 JKRAssertHeap::do_getSize(void*) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D145C.s"
}
asm s32 JKRAssertHeap::do_getFreeSize(void) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D1464.s"
}
asm void* JKRAssertHeap::do_getMaxFreeBlock(void) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D146C.s"
}
asm s32 JKRAssertHeap::do_getTotalFreeSize(void) {
nofralloc
#include "JSystem/JKernel/JKRAssertHeap/asm/func_802D1474.s"
}
+68 -1
View File
@@ -1 +1,68 @@
// ok
#include "JSystem/JKernel/JKRDvdFile/JKRDvdFile.h"
#include "global.h"
asm JKRDvdFile::JKRDvdFile(void) {
nofralloc
#include "JSystem/JKernel/JKRDvdFile/asm/func_802D9584.s"
}
asm JKRDvdFile::JKRDvdFile(char const *) {
nofralloc
#include "JSystem/JKernel/JKRDvdFile/asm/func_802D95F8.s"
}
asm JKRDvdFile::JKRDvdFile(long) {
nofralloc
#include "JSystem/JKernel/JKRDvdFile/asm/func_802D96A0.s"
}
asm JKRDvdFile::~JKRDvdFile() {
nofralloc
#include "JSystem/JKernel/JKRDvdFile/asm/func_802D9748.s"
}
asm void JKRDvdFile::initiate(void) {
nofralloc
#include "JSystem/JKernel/JKRDvdFile/asm/func_802D97E4.s"
}
asm bool JKRDvdFile::open(char const *) {
nofralloc
#include "JSystem/JKernel/JKRDvdFile/asm/func_802D9850.s"
}
asm bool JKRDvdFile::open(long) {
nofralloc
#include "JSystem/JKernel/JKRDvdFile/asm/func_802D98C4.s"
}
asm void JKRDvdFile::close(void) {
nofralloc
#include "JSystem/JKernel/JKRDvdFile/asm/func_802D9938.s"
}
asm void JKRDvdFile::readData(void *, long, long) {
nofralloc
#include "JSystem/JKernel/JKRDvdFile/asm/func_802D99B4.s"
}
asm s32 JKRDvdFile::writeData(void const *, long, long) {
nofralloc
#include "JSystem/JKernel/JKRDvdFile/asm/func_802D9A68.s"
}
asm void JKRDvdFile::sync(void) {
nofralloc
#include "JSystem/JKernel/JKRDvdFile/asm/func_802D9A70.s"
}
asm void JKRDvdFile::doneProcess(long, DVDFileInfo *) {
nofralloc
#include "JSystem/JKernel/JKRDvdFile/asm/func_802D9AC4.s"
}
asm s32 JKRDvdFile::getFileSize(void) const {
nofralloc
#include "JSystem/JKernel/JKRDvdFile/asm/func_802D9AF8.s"
}
+208 -1
View File
@@ -1 +1,208 @@
// ok
#include "JSystem/JKernel/JKRExpHeap/JKRExpHeap.h"
#include "global.h"
asm void JKRExpHeap::createRoot(int, bool) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CEDB4.s"
}
asm void JKRExpHeap::create(u32, JKRHeap *, bool) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CEE2C.s"
}
asm void JKRExpHeap::create(void *, u32, JKRHeap *, bool) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CEF00.s"
}
asm void JKRExpHeap::do_destroy(void) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CEFAC.s"
}
asm JKRExpHeap::JKRExpHeap(void *, u32, JKRHeap *, bool) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CF030.s"
}
asm JKRExpHeap::~JKRExpHeap() {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CF0C0.s"
}
asm void* JKRExpHeap::do_alloc(u32, int) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CF128.s"
}
asm void JKRExpHeap::allocFromHead(u32, int) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CF234.s"
}
asm void JKRExpHeap::allocFromHead(u32) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CF490.s"
}
asm void JKRExpHeap::allocFromTail(u32, int) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CF574.s"
}
asm void JKRExpHeap::allocFromTail(u32) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CF6D4.s"
}
asm void JKRExpHeap::do_free(void *) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CF7AC.s"
}
asm void JKRExpHeap::do_freeAll(void) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CF820.s"
}
asm void JKRExpHeap::do_freeTail(void) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CF89C.s"
}
asm void JKRExpHeap::do_fillFreeArea(void) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CF924.s"
}
asm u8 JKRExpHeap::do_changeGroupID(u8) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CF928.s"
}
asm s32 JKRExpHeap::do_resize(void *, u32) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CF978.s"
}
asm s32 JKRExpHeap::do_getSize(void *) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CFB24.s"
}
asm s32 JKRExpHeap::do_getFreeSize(void) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CFBA4.s"
}
asm void* JKRExpHeap::do_getMaxFreeBlock(void) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CFC10.s"
}
asm s32 JKRExpHeap::do_getTotalFreeSize(void) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CFC84.s"
}
asm s32 JKRExpHeap::getUsedSize( unsigned char) const {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CFCE8.s"
}
asm s32 JKRExpHeap::getTotalUsedSize( void) const {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CFD64.s"
}
asm void JKRExpHeap::appendUsedList(JKRExpHeap::CMemBlock *) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CFDCC.s"
}
asm void JKRExpHeap::setFreeBlock(JKRExpHeap::CMemBlock *, JKRExpHeap::CMemBlock *, JKRExpHeap::CMemBlock *) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CFE68.s"
}
asm void JKRExpHeap::removeFreeBlock(JKRExpHeap::CMemBlock *) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CFEB4.s"
}
asm void JKRExpHeap::removeUsedBlock(JKRExpHeap::CMemBlock *) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CFEE8.s"
}
asm void JKRExpHeap::recycleFreeBlock(JKRExpHeap::CMemBlock *) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802CFF1C.s"
}
asm void JKRExpHeap::joinTwoBlocks(JKRExpHeap::CMemBlock *) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802D00B4.s"
}
asm bool JKRExpHeap::check(void) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802D0190.s"
}
asm bool JKRExpHeap::dump(void) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802D03B8.s"
}
asm void JKRExpHeap::dump_sort(void) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802D05CC.s"
}
asm void JKRExpHeap::CMemBlock::initiate( JKRExpHeap::CMemBlock *, JKRExpHeap::CMemBlock *, u32, unsigned char, unsigned char) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802D0810.s"
}
asm void JKRExpHeap::CMemBlock::allocFore( u32, unsigned char, unsigned char, unsigned char, unsigned char) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802D0830.s"
}
asm void JKRExpHeap::CMemBlock::allocBack( u32, unsigned char, unsigned char, unsigned char, unsigned char) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802D0874.s"
}
asm void JKRExpHeap::CMemBlock::free( JKRExpHeap *) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802D08CC.s"
}
asm void JKRExpHeap::CMemBlock::getHeapBlock( void *) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802D091C.s"
}
asm void JKRExpHeap::state_register(JKRHeap::TState *, u32) const {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802D0938.s"
}
asm bool JKRExpHeap::state_compare( JKRHeap::TState const &, JKRHeap::TState const &) const {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802D09E0.s"
}
asm u32 JKRExpHeap::getHeapType(void) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802D0A10.s"
}
asm u8 JKRExpHeap::do_getCurrentGroupId(void) {
nofralloc
#include "JSystem/JKernel/JKRExpHeap/asm/func_802D0A1C.s"
}
+8 -1
View File
@@ -1 +1,8 @@
// ok
#include "JSystem/JKernel/JKRFile/JKRFile.h"
#include "global.h"
asm s32 JKRFile::read(void *, long, long) {
nofralloc
#include "JSystem/JKernel/JKRFile/asm/func_802D9518.s"
}
+122 -1
View File
@@ -1 +1,122 @@
// ok
#include "JSystem/JKernel/JKRFileCache/JKRFileCache.h"
#include "global.h"
asm void JKRFileCache::mount(char const*, JKRHeap*, char const*) {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D49B4.s"
}
asm JKRFileCache::JKRFileCache(char const*, char const*) {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D4AB4.s"
}
asm JKRFileCache::~JKRFileCache() {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D4C70.s"
}
asm void JKRFileCache::becomeCurrent(char const*) {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D4D44.s"
}
asm void JKRFileCache::getResource(char const*) {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D4DD8.s"
}
asm void JKRFileCache::getResource(unsigned long, char const*) {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D4EDC.s"
}
asm void JKRFileCache::readResource(void*, unsigned long, char const*) {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D4F64.s"
}
asm void JKRFileCache::readResource(void*, unsigned long, unsigned long, char const*) {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D503C.s"
}
asm void JKRFileCache::removeResourceAll(void) {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D50D4.s"
}
asm void JKRFileCache::removeResource(void*) {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D5164.s"
}
asm void JKRFileCache::detachResource(void*) {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D51F8.s"
}
asm void JKRFileCache::getResSize(void const*) const {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D526C.s"
}
asm void JKRFileCache::countFile(char const*) const {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D52A0.s"
}
asm void JKRFileCache::getFirstFile(char const*) const {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D531C.s"
}
asm void JKRFileCache::findCacheBlock(void const*) const {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D53B8.s"
}
asm void JKRFileCache::findCacheBlock(unsigned long) const {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D53E4.s"
}
asm void JKRFileCache::findFile(char*, char const*) const {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D5410.s"
}
asm void JKRFileCache::getDvdPathName(char const*) const {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D551C.s"
}
asm void JKRFileCache::convStrLower(char*) const {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D5624.s"
}
asm JKRFileCache::CCacheBlock::CCacheBlock(unsigned long, unsigned long, void const*) {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D566C.s"
}
asm void JKRFileCache::getFsResource(char const*) {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D56C8.s"
}
asm void JKRFileCache::getNameResource(unsigned long, char const*) {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D56F4.s"
}
asm void JKRFileCache::readFsResource(void*, unsigned long, char const*) {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D5720.s"
}
asm void JKRFileCache::readNameResource(void*, unsigned long, unsigned long, char const*) {
nofralloc
#include "JSystem/JKernel/JKRFileCache/asm/func_802D574C.s"
}
+38 -1
View File
@@ -1 +1,38 @@
// ok
#include "JSystem/JKernel/JKRFileFinder/JKRFileFinder.h"
#include "global.h"
asm JKRArcFinder::JKRArcFinder(JKRArchive *, long, long) {
nofralloc
#include "JSystem/JKernel/JKRFileFinder/asm/func_802D4638.s"
}
asm bool JKRArcFinder::findNextFile(void) {
nofralloc
#include "JSystem/JKernel/JKRFileFinder/asm/func_802D46C4.s"
}
asm JKRDvdFinder::JKRDvdFinder(char const *) {
nofralloc
#include "JSystem/JKernel/JKRFileFinder/asm/func_802D4770.s"
}
asm JKRDvdFinder:: ~JKRDvdFinder() {
nofralloc
#include "JSystem/JKernel/JKRFileFinder/asm/func_802D47F4.s"
}
asm bool JKRDvdFinder::findNextFile(void) {
nofralloc
#include "JSystem/JKernel/JKRFileFinder/asm/func_802D4874.s"
}
asm JKRFileFinder::~JKRFileFinder() {
nofralloc
#include "JSystem/JKernel/JKRFileFinder/asm/func_802D4910.s"
}
asm JKRArcFinder::~JKRArcFinder() {
nofralloc
#include "JSystem/JKernel/JKRFileFinder/asm/func_802D4958.s"
}
+53 -1
View File
@@ -1 +1,53 @@
// ok
#include "JSystem/JKernel/JKRFileLoader/JKRFileLoader.h"
#include "global.h"
asm JKRFileLoader::JKRFileLoader(void) {
nofralloc
#include "JSystem/JKernel/JKRFileLoader/asm/func_802D40F0.s"
}
asm JKRFileLoader::~JKRFileLoader() {
nofralloc
#include "JSystem/JKernel/JKRFileLoader/asm/func_802D4148.s"
}
asm void JKRFileLoader::unmount(void) {
nofralloc
#include "JSystem/JKernel/JKRFileLoader/asm/func_802D41D4.s"
}
asm void* JKRFileLoader::getGlbResource(char const *) {
nofralloc
#include "JSystem/JKernel/JKRFileLoader/asm/func_802D4224.s"
}
asm void* JKRFileLoader::getGlbResource(char const *, JKRFileLoader *) {
nofralloc
#include "JSystem/JKernel/JKRFileLoader/asm/func_802D4270.s"
}
asm bool JKRFileLoader::removeResource(void *, JKRFileLoader *) {
nofralloc
#include "JSystem/JKernel/JKRFileLoader/asm/func_802D4308.s"
}
asm bool JKRFileLoader::detachResource(void *, JKRFileLoader *) {
nofralloc
#include "JSystem/JKernel/JKRFileLoader/asm/func_802D43A0.s"
}
asm JKRFileLoader* JKRFileLoader::findVolume(char const **) {
nofralloc
#include "JSystem/JKernel/JKRFileLoader/asm/func_802D4438.s"
}
#if 0
// JSystem\JKernel\JKRFileLoader\asm\func_802D44C4.s:18: illegal object reference in constant expression (lbl_804508C0)
// JSystem\JKernel\JKRFileLoader\asm\func_802D44C4.s:20: illegal object reference in constant expression (lbl_804508C0)
// JSystem\JKernel\JKRFileLoader\asm\func_802D44C4.s:57: illegal object reference in constant expression (lbl_804508C0)
asm void JKRFileLoader::fetchVolumeName(char *, long, char const *) {
nofralloc
#include "JSystem/JKernel/JKRFileLoader/asm/func_802D44C4.s"
}
#endif
+11 -12
View File
@@ -4,9 +4,9 @@
// #include "JSystem/JKernel/JKRHeap/asm/func_802CE138.s"
JKRHeap::JKRHeap(void* data, u32 size, JKRHeap* parent, bool error_flag)
: JKRDisposer(), mChildTree(this), mDisposerList() {
OSInitMutex(this->mutex);
OSInitMutex(this->mMutex);
this->mSize = size;
this->mBegin = (u32)data;
this->mStart = (u32)data;
this->mEnd = (u32)data + size;
if (parent == NULL) {
@@ -28,9 +28,9 @@ JKRHeap::JKRHeap(void* data, u32 size, JKRHeap* parent, bool error_flag)
lbl_8045137C = JKRHeap::JKRDefaultMemoryErrorRoutine;
}
this->field_0x3c = lbl_804508B0[0];
this->field_0x3d = lbl_80451380[0];
this->field_0x69 = 0;
this->mDebugFill = lbl_804508B0;
this->mCheckMemoryFilled = lbl_80451380;
this->mInitFlag = false;
}
// using the wrong register for storing the results
@@ -42,7 +42,7 @@ JKRHeap::~JKRHeap() {
JSUTree<JKRHeap>* nextRootHeap = lbl_80451378->mChildTree.getFirstChild();
JKRHeap* rootHeap = lbl_80451378;
JKRHeap* rootHeap = lbl_80451378;
JKRHeap* currentHeap = lbl_80451374;
if (currentHeap == this) {
if (!nextRootHeap) {
@@ -224,20 +224,19 @@ s32 JKRHeap::getMaxAllocatableSize(int alignment) {
return alignedSize;
}
#else
asm s32 JKRHeap::getMaxAllocatableSize(int alignment){
asm s32 JKRHeap::getMaxAllocatableSize(int alignment) {
nofralloc
#include "JSystem/JKernel/JKRHeap/asm/func_802CE7DC.s"
}
#endif
// #include "JSystem/JKernel/JKRHeap/asm/func_802CE83C.s"
JKRHeap* JKRHeap::findFromRoot(void* ptr) {
if (lbl_80451378 == NULL) {
return NULL;
}
if ((void*)lbl_80451378->mBegin <= ptr && ptr < (void*)lbl_80451378->mEnd) {
if (lbl_80451378->getStartAddr() <= ptr && ptr < lbl_80451378->getEndAddr()) {
return lbl_80451378->find(ptr);
}
@@ -246,7 +245,7 @@ JKRHeap* JKRHeap::findFromRoot(void* ptr) {
// #include "JSystem/JKernel/JKRHeap/asm/func_802CE894.s"
JKRHeap* JKRHeap::find(void* ptr) const {
if ((void*)this->mBegin <= ptr && ptr < (void*)this->mEnd) {
if (this->getStartAddr() <= ptr && ptr < this->getEndAddr()) {
const JSUTree<JKRHeap>& tree = this->mChildTree;
if (tree.getNumChildren() != 0) {
JSUTreeIterator<JKRHeap> iterator;
@@ -280,8 +279,8 @@ JKRHeap* JKRHeap::findAllHeap(void* ptr) const {
}
}
if ((void*)this->mBegin <= ptr && ptr < (void*)this->mEnd) {
// Cast away const
if (this->getStartAddr() <= ptr && ptr < this->getEndAddr()) {
// not sure about this... casting away const for now.
return (JKRHeap*)this;
}
+113 -1
View File
@@ -1 +1,113 @@
// ok
#include "JSystem/JKernel/JKRSolidHeap/JKRSolidHeap.h"
#include "global.h"
asm void JKRSolidHeap::create(unsigned long, JKRHeap *, bool) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D0A24.s"
}
asm void JKRSolidHeap::do_destroy(void) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D0AD0.s"
}
asm JKRSolidHeap::JKRSolidHeap(void *, unsigned long, JKRHeap *, bool) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D0B30.s"
}
asm JKRSolidHeap::~JKRSolidHeap(void) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D0B8C.s"
}
asm void JKRSolidHeap::adjustSize(void) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D0BF4.s"
}
asm void* JKRSolidHeap::do_alloc(unsigned long, int) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D0CB0.s"
}
asm void JKRSolidHeap::allocFromHead(unsigned long, int) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D0D58.s"
}
asm void JKRSolidHeap::allocFromTail(unsigned long, int) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D0E20.s"
}
asm void JKRSolidHeap::do_free(void *) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D0EE4.s"
}
asm void JKRSolidHeap::do_freeAll(void) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D0F14.s"
}
asm void JKRSolidHeap::do_freeTail(void) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D0F74.s"
}
asm void JKRSolidHeap::do_fillFreeArea(void) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D1000.s"
}
asm s32 JKRSolidHeap::do_resize(void *, unsigned long) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D1004.s"
}
asm s32 JKRSolidHeap::do_getSize(void *) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D1038.s"
}
asm bool JKRSolidHeap::check(void) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D106C.s"
}
asm bool JKRSolidHeap::dump(void) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D10FC.s"
}
asm void JKRSolidHeap::state_register(JKRHeap::TState *, unsigned long) const {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D11FC.s"
}
asm bool JKRSolidHeap::state_compare(JKRHeap::TState const &, JKRHeap::TState const &) const {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D1258.s"
}
asm u32 JKRSolidHeap::getHeapType(void) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D1288.s"
}
asm s32 JKRSolidHeap::do_getFreeSize(void) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D1294.s"
}
asm void* JKRSolidHeap::do_getMaxFreeBlock(void) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D129C.s"
}
asm s32 JKRSolidHeap::do_getTotalFreeSize(void) {
nofralloc
#include "JSystem/JKernel/JKRSolidHeap/asm/func_802D12A4.s"
}
+147 -1
View File
@@ -1 +1,147 @@
// ok
#include "JSystem/JKernel/JKRThread/JKRThread.h"
#include "JSystem/JKernel/JKRHeap/JKRHeap.h"
#include "global.h"
// #include "JSystem/JKernel/JKRThread/asm/func_802D1568.s"
JKRThread::JKRThread(u32 stack_size, int message_count, int param_3) : mThreadListLink(this) {
this->mSwitchCount = 0;
this->mCost = 0;
this->field_0x6c = 0;
this->field_0x60 = 0;
this->field_0x70 = 0;
JKRHeap* heap = JKRHeap::findFromRoot(this);
if (heap == NULL) {
heap = lbl_80451370;
}
this->setCommon_heapSpecified(heap, stack_size, param_3);
this->setCommon_mesgQueue(this->mHeap, message_count);
}
// #include "JSystem/JKernel/JKRThread/asm/func_802D1610.s"
JKRThread::JKRThread(JKRHeap* heap, u32 stack_size, int message_count, int param_4) : mThreadListLink(this) {
this->mSwitchCount = 0;
this->mCost = 0;
this->field_0x6c = 0;
this->field_0x60 = 0;
this->field_0x70 = 0;
if (heap == NULL) {
heap = lbl_80451374;
}
this->setCommon_heapSpecified(heap, stack_size, param_4);
this->setCommon_mesgQueue(this->mHeap, message_count);
}
asm JKRThread::JKRThread(OSThread* thread, int message_count) {
nofralloc
#include "JSystem/JKernel/JKRThread/asm/func_802D16B8.s"
}
asm JKRThread::~JKRThread() {
nofralloc
#include "JSystem/JKernel/JKRThread/asm/func_802D1758.s"
}
// #include "JSystem/JKernel/JKRThread/asm/func_802D1830.s"
void JKRThread::setCommon_mesgQueue(JKRHeap* heap, int message_count) {
this->mMessageCount = message_count;
this->mMessages = (OSMessage*)JKRHeap::alloc(this->mMessageCount * sizeof(OSMessage), 0, heap);
OSInitMessageQueue(&this->mQueue, this->mMessages, this->mMessageCount);
lbl_8043428C.append(&this->mThreadListLink);
this->field_0x74 = (JKRHeap*)NULL;
this->field_0x78 = (JKRHeap*)NULL;
}
// #include "JSystem/JKernel/JKRThread/asm/func_802D18A4.s"
void JKRThread::setCommon_heapSpecified(JKRHeap* heap, u32 stack_size, int param_3) {
this->mHeap = heap;
this->mStackSize = stack_size & 0xffffffe0;
this->mStackPtr = JKRHeap::alloc(this->mStackSize, 0x20, this->mHeap);
this->mOsThread = (OSThread*)JKRHeap::alloc(sizeof(OSThread), 0x20, this->mHeap);
void* stackBase = (void*)((int)this->mStackPtr + this->mStackSize);
OSCreateThread(this->mOsThread, start, this, stackBase, this->mStackSize, param_3, 1);
}
// #include "JSystem/JKernel/JKRThread/asm/func_802D1934.s"
void* JKRThread::start(void* param) {
JKRThread* thread = (JKRThread*)param;
return thread->run();
}
#ifdef NONMATCHING
// #include "JSystem/JKernel/JKRThread/asm/func_802D1960.s"
JKRThread* JKRThread::searchThread(OSThread* thread) {
JSUList<JKRThread>* threadList = JKRThread::getList();
JSUListIterator<JKRThread> iterator;
for (iterator = threadList; iterator != threadList->getEnd(); iterator++) {
JKRThread* jkrThread = iterator.getObject();
if (jkrThread->mOsThread == thread) {
return jkrThread;
}
}
return NULL;
}
#else
asm JKRThread* JKRThread::searchThread(OSThread* thread) {
nofralloc
#include "JSystem/JKernel/JKRThread/asm/func_802D1960.s"
}
#endif
//
//
//
asm JKRThreadSwitch::JKRThreadSwitch(JKRHeap* heap) {
nofralloc
#include "JSystem/JKernel/JKRThread/asm/func_802D199C.s"
}
asm JKRThreadSwitch* JKRThreadSwitch::createManager(JKRHeap* heap) {
nofralloc
#include "JSystem/JKernel/JKRThread/asm/func_802D1A14.s"
}
asm JKRThread* JKRThreadSwitch::enter(JKRThread* param_1, int param_2) {
nofralloc
#include "JSystem/JKernel/JKRThread/asm/func_802D1A70.s"
}
asm void JKRThreadSwitch::callback(OSThread* param_1, OSThread* param_2) {
nofralloc
#include "JSystem/JKernel/JKRThread/asm/func_802D1AE4.s"
}
asm void JKRThreadSwitch::draw(JKRThreadName_* param_1, JUTConsole* param_2){nofralloc
#include "JSystem/JKernel/JKRThread/asm/func_802D1C74.s"
}
//
//
//
// #include "JSystem/JKernel/JKRThread/asm/func_802D1E14.s"
void* JKRThread::run() {
return NULL;
}
//
//
//
asm void JKRThreadSwitch::draw(JKRThreadName_* param_1) {
nofralloc
#include "JSystem/JKernel/JKRThread/asm/func_802D1E1C.s"
}
asm JKRThreadSwitch::~JKRThreadSwitch() {
nofralloc
#include "JSystem/JKernel/JKRThread/asm/func_802D1E4C.s"
}