summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorJulgodis <>2021-01-28 19:03:51 +0100
committerJulgodis <>2021-01-29 22:52:35 +0100
commitcf4bf3fc53ab72ff76f5907e15f6257ed1d22155 (patch)
tree3b967b8104b8569d661dcac352eefb4615e16b69 /libs
parent6aa3fb4ff68c270a1a1f5582c5461e75a2badca1 (diff)
replace symbols with string literals and python script
Diffstat (limited to 'libs')
-rw-r--r--libs/JSystem/JKernel/JKRAram.cpp13
-rw-r--r--libs/JSystem/JKernel/JKRAramPiece.cpp14
-rw-r--r--libs/JSystem/JKernel/JKRAramStream.cpp8
-rw-r--r--libs/JSystem/JKernel/JKRHeap.cpp7
-rw-r--r--libs/JSystem/JKernel/JKRSolidHeap.cpp2
-rw-r--r--libs/JSystem/JKernel/JKRThread.cpp7
6 files changed, 26 insertions, 25 deletions
diff --git a/libs/JSystem/JKernel/JKRAram.cpp b/libs/JSystem/JKernel/JKRAram.cpp
index ad2a8858fd..1a4843275d 100644
--- a/libs/JSystem/JKernel/JKRAram.cpp
+++ b/libs/JSystem/JKernel/JKRAram.cpp
@@ -107,17 +107,11 @@ asm void* JKRAram::run(void) {
void JKRAram::checkOkAddress(u8* addr, u32 size, JKRAramBlock* block, u32 param_4) {
if (!IS_ALIGNED((u32)addr, 0x20) && !IS_ALIGNED(size, 0x20)) {
- const char* file = lbl_8039D078;
- const char* format = lbl_8039D078 + 0xc;
- const char* arg1 = lbl_8039D078 + 0xc + 0x3;
- JUTException_NS_panic_f(file, 0xdb, format, arg1);
+ JUTException_NS_panic_f("JKRAram.cpp", 0xdb, "%s", ":::address not 32Byte aligned.");
}
if (block && !IS_ALIGNED((u32)block->getAddress() + param_4, 0x20)) {
- const char* file = lbl_8039D078;
- const char* format = lbl_8039D078 + 0xc;
- const char* arg1 = lbl_8039D078 + 0xc + 0x3;
- JUTException_NS_panic_f(file, 0xe3, format, arg1);
+ JUTException_NS_panic_f("JKRAram.cpp", 0xe3, "%s", ":::address not 32Byte aligned.");
}
}
@@ -290,3 +284,6 @@ asm JSUList<12JKRAMCommand>::~JSUList<12JKRAMCommand>(void) {
#include "JSystem/JKernel/JKRAram/asm/func_802D2DF0.s"
}
#endif
+
+const char* lbl_8039D0A6 = "bad aramSync\n";
+const char* lbl_8039D0B4 = "\x00\x00\x00"; /* padding */
diff --git a/libs/JSystem/JKernel/JKRAramPiece.cpp b/libs/JSystem/JKernel/JKRAramPiece.cpp
index ad2b83d170..f04b2f1de8 100644
--- a/libs/JSystem/JKernel/JKRAramPiece.cpp
+++ b/libs/JSystem/JKernel/JKRAramPiece.cpp
@@ -24,15 +24,11 @@ JKRAMCommand* JKRAramPiece::orderAsync(int direction, u32 source, u32 destinatio
JKRAramBlock* block, JKRAMCommand::AsyncCallback callback) {
lock();
if (((source & 0x1f) != 0) || ((destination & 0x1f) != 0)) {
- OSReport(lbl_8039D0B8, direction); // "direction = %x\n"
- OSReport(lbl_8039D0B8 + 0x10, source); // "source = %x\n"
- OSReport(lbl_8039D0B8 + 0x1D, destination); // "destination = %x\n"
- OSReport(lbl_8039D0B8 + 0x2F, length); // "length = %x\n"
-
- const char* filename = lbl_8039D0B8 + 0x3C; // "JKRAramPiece.cpp"ยง
- const char* format = lbl_8039D0B8 + 0x3C + 0x11; // "%s"
- const char* arg1 = lbl_8039D0B8 + 0x3C + 0x14; // "illegal address. abort."
- JUTException_NS_panic_f(filename, 0x6c, format, arg1);
+ OSReport("direction = %x\n", direction);
+ OSReport("source = %x\n", source);
+ OSReport("destination = %x\n", destination);
+ OSReport("length = %x\n", length);
+ JUTException_NS_panic_f("JKRAramPiece.cpp", 0x6c, "%s", "illegal address. abort.");
}
Message* message = new (JKRHeap::getSystemHeap(), -4) Message();
diff --git a/libs/JSystem/JKernel/JKRAramStream.cpp b/libs/JSystem/JKernel/JKRAramStream.cpp
index 353bfbe285..97a85bdb79 100644
--- a/libs/JSystem/JKernel/JKRAramStream.cpp
+++ b/libs/JSystem/JKernel/JKRAramStream.cpp
@@ -2,6 +2,8 @@
#include "JSystem/JKernel/JKRAramPiece/JKRAramPiece.h"
#include "global.h"
+extern char lbl_8039D120[32];
+
JKRAramStream* JKRAramStream::create(long priority) {
if (!sAramStreamObject) {
sAramStreamObject = new (JKRGetSystemHeap(), 0) JKRAramStream(priority);
@@ -86,10 +88,7 @@ s32 JKRAramStream::writeToAram(JKRAramStreamCommand* command) {
heap->dump();
}
- const char* file = lbl_8039D120; // "JKRAramStream.cpp";
- const char* format = lbl_8039D120 + 0x12; // "%s";
- const char* arg1 = lbl_8039D120 + 0x15; // ":::Cannot alloc memory\n";
- JUTException_NS_panic_f(file, 0xac, format, arg1);
+ JUTException_NS_panic_f("JKRAramStream.cpp", 0xac, "%s", ":::Cannot alloc memory\n");
}
if (buffer) {
@@ -208,3 +207,4 @@ JKRAramStreamCommand::JKRAramStreamCommand() {
s32 JSURandomInputStream::getAvailable() const {
return getLength() - getPosition();
}
+
diff --git a/libs/JSystem/JKernel/JKRHeap.cpp b/libs/JSystem/JKernel/JKRHeap.cpp
index bf3ee74898..96d49dbb94 100644
--- a/libs/JSystem/JKernel/JKRHeap.cpp
+++ b/libs/JSystem/JKernel/JKRHeap.cpp
@@ -336,10 +336,7 @@ void JKRHeap::copyMemory(void* dst, void* src, u32 size) {
}
void JKRHeap::JKRDefaultMemoryErrorRoutine(JKRHeap* heap, u32 size, int alignment) {
- const char* filename = lbl_8039CAD8; // "JKRHeap.cpp"
- const char* format = lbl_8039CAD8 + 12; // "%s"
- const char* arg1 = lbl_8039CAD8 + 15; // "abort\n"
- JUTException_NS_panic_f(filename, 0x33f, format, arg1);
+ JUTException_NS_panic_f("JKRHeap.cpp", 0x33f, "%s", "abort\n");
}
bool JKRHeap::setErrorFlag(bool errorFlag) {
@@ -437,3 +434,5 @@ u8 JKRHeap::do_changeGroupID(u8 newGroupID) {
u8 JKRHeap::do_getCurrentGroupId() const {
return 0;
}
+
+const char* lbl_8039CAEE = "\x00"; /* padding */
diff --git a/libs/JSystem/JKernel/JKRSolidHeap.cpp b/libs/JSystem/JKernel/JKRSolidHeap.cpp
index 5bbbd40a3d..ddbe0b75f9 100644
--- a/libs/JSystem/JKernel/JKRSolidHeap.cpp
+++ b/libs/JSystem/JKernel/JKRSolidHeap.cpp
@@ -282,3 +282,5 @@ void* JKRSolidHeap::do_getMaxFreeBlock(void) const {
s32 JKRSolidHeap::do_getTotalFreeSize(void) const {
return getFreeSize();
}
+
+const char* lbl_8039CFA7 = ""; /* padding */
diff --git a/libs/JSystem/JKernel/JKRThread.cpp b/libs/JSystem/JKernel/JKRThread.cpp
index b37c996d3d..e2da7735f9 100644
--- a/libs/JSystem/JKernel/JKRThread.cpp
+++ b/libs/JSystem/JKernel/JKRThread.cpp
@@ -2,6 +2,13 @@
#include "JSystem/JKernel/JKRHeap/JKRHeap.h"
#include "global.h"
+// lbl_80455FC0 JKRThread.o @934
+static const u8 lbl_80455FC0[4] = {0x42, 0xc8, 0x0, 0x0};
+// lbl_80455FC4 JKRThread.o @935
+static const u8 lbl_80455FC4[4] = {0x44, 0x7a, 0x0, 0x0};
+// lbl_80455FC8 JKRThread.o @937
+static const u8 lbl_80455FC8[8] = {0x43, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
+
JKRThread::JKRThread(u32 stack_size, int message_count, int param_3) : mThreadListLink(this) {
mSwitchCount = 0;
mCost = 0;