add orderstringsm for sdata2 strings

This commit is contained in:
SwareJonge 2023-02-06 04:29:54 +01:00
parent ab0e020bbb
commit 08a4f2028b
8 changed files with 43 additions and 33 deletions

View File

@ -205,10 +205,10 @@ Osako/main.cpp:
#Osako/system.cpp:
#.text: [0x801feb10, 0x801ffe80] # exclude __sinit_system_cpp (801fff8c)
#.ctors: [0x8031637c, 0x80316380]
##.ctors: [0x8031637c, 0x80316380]
#.rodata: [0x8037d5e8, 0x8037d658]
#.data: [0x8039cac0, 0x8039caf8]
#.bss: [0x803d08f0, 0x803d0920]
##.bss: [0x803d08f0, 0x803d0920]
#.sbss: [0x80416968, 0x80416998]
#.sdata2: [0x8041b688, 0x8041b6e8]

View File

@ -1100,8 +1100,9 @@ global:
# GameAudioMain.cpp
0x8011b4a8: init__Q29GameAudio4MainFP12JKRSolidHeapUlPvPvUl
0x8011e540: startSystemSe__Q29GameAudio4MainFUl
0x80416218: msBasic__Q29GameAudio4Main
# MotorManager.cpp
# MotorManager.cpp
0x80130e58: __ct__12MotorManagerFP7JKRHeap
0x80130ee0: __dt__12MotorManagerFv
0x80130f48: reset__12MotorManagerFv

View File

@ -299,12 +299,12 @@ class JumptableInclude(GeneratedInclude):
return f"JumptableInclude({self.addr})"
class StringInclude(GeneratedInclude):
REGEX = r'#include "orderstrings\/([0-9a-f]{8})_([0-9a-f]{8})\.inc"'
REGEX = r'#include "(orderstrings(m?))\/([0-9a-f]{8})_([0-9a-f]{8})\.inc"'
def __init__(self, ctx: c.SourceContext, source_name: str, match: Tuple[str]):
self.start, self.end = match
folder, manual, self.start, self.end = match
super().__init__(ctx, source_name,
f"{c.BUILD_INCDIR}/orderstrings/{self.start}_{self.end}.inc")
f"{c.BUILD_INCDIR}/{folder}/{self.start}_{self.end}.inc")
def build(includes: List["StringInclude"]):
# Skip empty list
@ -316,12 +316,14 @@ class StringInclude(GeneratedInclude):
# Build
for inc in includes:
sda = "--sda " if ctx.sdata2_threshold >= 4 else ""
n.build(
inc.path,
rule="orderstrings",
inputs=ctx.binary,
variables={
"addrs" : f"{inc.start} {inc.end}"
"addrs" : f"{inc.start} {inc.end}",
"flags" : f"{sda}"
}
)

View File

@ -95,6 +95,13 @@ public:
return JUTVideo::getManager()->getFbWidth();
}
JUTFader * getFader() const { return mFader; }
void setFader(JUTFader * fader) { mFader = fader; }
void set_38(int val) {
_38 = val;
}
int startFadeOut(int param_0) {
if (mFader != nullptr) {
return mFader->startFadeOut(param_0);

View File

@ -46,7 +46,6 @@ bool JKRDvdFinder::findNextFile() {
mIsAvailable = DVDReadDir(&mFstEntry, &entry);
if (mIsAvailable)
{
u16 v1 = 1;
mIsFileOrDir = (bool)entry.mNextEntryNum;
mFileName = entry.mFileNameMaybe;
mFileIndex = entry.mEntryNum;

View File

@ -18,7 +18,7 @@ void TARecord::setStatus(u8 charId1, u8 charId2, u8 kartId, u8 courseId) {
}
void TARecord::setRaceTime(RaceTime raceTime) {
mTime = raceTime; // could also be just mTime = raceTime
mTime = raceTime;
}
void TARecord::set(u8 charId1, u8 charId2, u8 kartId, u8 courseId, const char * name, RaceTime raceTime) {
@ -34,5 +34,5 @@ bool TARecord::less(const TARecord & mRec) {
if(mKartID == 0xff)
return true;
return mRec.mTime.isLittle(mTime);
return mRec.getRaceTime().isLittle(mTime);
}

View File

@ -16,7 +16,6 @@ static const float lbl_8037d5e8[4] = {0.0f, 0.0f, 0.0f, 1.0f};
#pragma force_active on
DUMMY_POINTER(lbl_8037d5e8)
#pragma pop
#include "orderstrings/8037d60c_8037d670.inc"
namespace System {
void startAudioTask(void* p1) {
@ -103,10 +102,14 @@ namespace System {
}*/
}
#include "orderstrings/8037d60c_8037d670.inc"
// .sdata2
#include "orderstrings/8041b688_8041b6b4.inc"
#include "orderstringsm/8041b688_8041b6b4.inc"
/*const float lbl_8041b6b4 = -1.0f;
const float lbl_8041b6b8 = 1.0f;
const float lbl_8041b6bc = 0.0f;*/
#include "orderfloatsm/8041b6b4_8041b6c0.inc"
#include "orderstrings/8041b6c0_8041b6e8.inc"
#include "orderstringsm/8041b6c0_8041b6e8.inc"
asm void System::init()
{
@ -117,7 +120,7 @@ asm void System::init()
namespace System {
void reset()
{
mspDisplay->_38 = 1;
mspDisplay->set_38(1);
changeNormalRenderMode();
}
@ -134,14 +137,13 @@ namespace System {
void changeProgressive()
{
switch (msRenderMode)
{
case 0:
{
JUTVideo::getManager()->setRenderMode(SystemData::scNtscProg448Soft);
JUTVideo::getManager()->setRenderMode(&SystemData::scNtscProg448Soft);
msRenderMode = 2;
}
break;
case 1:
{
JUTVideo::getManager()->setRenderMode(SystemData::scNtscProg448);
JUTVideo::getManager()->setRenderMode(&SystemData::scNtscProg448);
msRenderMode = 3;
break;
}
@ -149,15 +151,14 @@ namespace System {
void changeMovieRenderMode()
{
switch (msRenderMode)
switch (msRenderMode)
{
case 0:
{
JUTVideo::getManager()->setRenderMode(SystemData::scNtscInt448);
JUTVideo::getManager()->setRenderMode(&SystemData::scNtscInt448);
msRenderMode = 1;
}
break;
case 2:
{
JUTVideo::getManager()->setRenderMode(SystemData::scNtscProg448);
JUTVideo::getManager()->setRenderMode(&SystemData::scNtscProg448);
msRenderMode = 3;
break;
}
@ -166,14 +167,13 @@ namespace System {
void changeNormalRenderMode()
{
switch (msRenderMode)
{
case 1:
{
JUTVideo::getManager()->setRenderMode(SystemData::scNtscInt448Df);
JUTVideo::getManager()->setRenderMode(&SystemData::scNtscInt448Df);
msRenderMode = 0;
}
break;
case 3:
{
JUTVideo::getManager()->setRenderMode(SystemData::scNtscProg448Soft);
JUTVideo::getManager()->setRenderMode(&SystemData::scNtscProg448Soft);
msRenderMode = 2;
break;
}
@ -182,9 +182,10 @@ namespace System {
void callbackException(u16, OSContext *, u32, u32)
{
haltRumble();
JUTFader *fader = mspDisplay->mFader; // getFader() or inline startfadeIn
mspDisplay->startFadeIn(0);
/*JUTFader *fader = mspDisplay->getFader(); // getFader() or inline startfadeIn
if (fader)
fader->startFadeIn(0);
fader->startFadeIn(0);*/
}
/*void haltRumble() {

@ -1 +1 @@
Subproject commit 83260829c50f37dd9fe54889cf8971c8fe14c54e
Subproject commit eca3f3015a86bf0c78d1e415aeff2dda1851194f