Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions config/RSBE01_02/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,24 @@ sora/mt/mt_prng.cpp:
sora/ac/ac_cmd_interpreter.cpp:
.text start:0x80139658 end:0x8013CA1C
.rodata start:0x80409520 end:0x8040964C
.data start:0x8045DD78 end:0x8045DDAC
.sdata start:0x8059E6D0 end:0x8059E6D8
.data start:0x8045DD78 end:0x8045DDF0
.sdata start:0x8059E6D0 end:0x8059E6F0
.sdata2 start:0x805A2AA8 end:0x805A2AC0

sora/ac/ac_anim_cmd_impl.cpp:
.text start:0x8013CA1C end:0x8013CF04
.data start:0x8045DDF0 end:0x8045DF78
.sdata start:0x8059E6F0 end:0x8059E718

sora/ac/ac_null.cpp:
.text start:0x8013CF04 end:0x8013D004
.ctors start:0x80406554 end:0x80406558
.rodata start:0x80409650 end:0x8040965C
.data start:0x8045DF78 end:0x8045DFD0
.bss start:0x8049EA10 end:0x8049EA20
.sdata start:0x8059E718 end:0x8059E720
.sbss start:0x805A0370 end:0x805A0380

Runtime.PPCEABI.H/__init_cpp_exceptions.cpp:
.text start:0x803F1A08 end:0x803F1A78
.ctors start:0x804064E0 end:0x804064E4 rename:.ctors$10
Expand Down
89 changes: 44 additions & 45 deletions config/RSBE01_02/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2920,7 +2920,7 @@ randf__Fv = .text:0x8003FB64; // type:function size:0x84
randaf__Fv = .text:0x8003FBE8; // type:function size:0x94
randi__Fl = .text:0x8003FC7C; // type:function size:0xB8
getMax__6mtRandFv = .text:0x8003FD34; // type:function size:0xC
__sinit_\mt_prng_cpp = .text:0x8003FD40; // type:function size:0x1C
__sinit_\mt_prng_cpp = .text:0x8003FD40; // type:function size:0x1C scope:local
mtSinf__Ff = .text:0x8003FD5C; // type:function size:0xA0
mtCosf__Ff = .text:0x8003FDFC; // type:function size:0xA8
mtSinCosf__FfPfPf = .text:0x8003FEA4; // type:function size:0x120
Expand Down Expand Up @@ -5995,35 +5995,35 @@ systemCmdFuncWhileAnd__16acCmdInterpreterFv = .text:0x8013C574; // type:function
systemCmdFuncWhileOr__16acCmdInterpreterFv = .text:0x8013C6B8; // type:function size:0x128
systemCmdFuncEndWhile__16acCmdInterpreterFv = .text:0x8013C7E0; // type:function size:0xE8
systemCmdFuncEnd__16acCmdInterpreterFv = .text:0x8013C8C8; // type:function size:0x154
fn_8013CA1C = .text:0x8013CA1C; // type:function size:0x10
fn_8013CA2C = .text:0x8013CA2C; // type:function size:0x10
fn_8013CA3C = .text:0x8013CA3C; // type:function size:0x20
fn_8013CA5C = .text:0x8013CA5C; // type:function size:0x1C
fn_8013CA78 = .text:0x8013CA78; // type:function size:0xE4
fn_8013CB5C = .text:0x8013CB5C; // type:function size:0x34
fn_8013CB90 = .text:0x8013CB90; // type:function size:0xA4
fn_8013CC34 = .text:0x8013CC34; // type:function size:0x34
fn_8013CC68 = .text:0x8013CC68; // type:function size:0x40
fn_8013CCA8 = .text:0x8013CCA8; // type:function size:0x34
fn_8013CCDC = .text:0x8013CCDC; // type:function size:0x10
fn_8013CCEC = .text:0x8013CCEC; // type:function size:0x10
fn_8013CCFC = .text:0x8013CCFC; // type:function size:0x90
fn_8013CD8C = .text:0x8013CD8C; // type:function size:0x7C
fn_8013CE08 = .text:0x8013CE08; // type:function size:0x54
fn_8013CE5C = .text:0x8013CE5C; // type:function size:0x60
fn_8013CEBC = .text:0x8013CEBC; // type:function size:0x8
fn_8013CEC4 = .text:0x8013CEC4; // type:function size:0x40
fn_8013CF04 = .text:0x8013CF04; // type:function size:0x40
fn_8013CF44 = .text:0x8013CF44; // type:function size:0x8
fn_8013CF4C = .text:0x8013CF4C; // type:function size:0x8
fn_8013CF54 = .text:0x8013CF54; // type:function size:0x8
fn_8013CF5C = .text:0x8013CF5C; // type:function size:0x8
fn_8013CF64 = .text:0x8013CF64; // type:function size:0x1C
fn_8013CF80 = .text:0x8013CF80; // type:function size:0x20
fn_8013CFA0 = .text:0x8013CFA0; // type:function size:0x8
fn_8013CFA8 = .text:0x8013CFA8; // type:function size:0x8
fn_8013CFB0 = .text:0x8013CFB0; // type:function size:0x8
fn_8013CFB8 = .text:0x8013CFB8; // type:function size:0x4C
getGroup__13acAnimCmdImplCFv = .text:0x8013CA1C; // type:function size:0x10
getType__13acAnimCmdImplCFv = .text:0x8013CA2C; // type:function size:0x10
getArgNum__13acAnimCmdImplCFv = .text:0x8013CA3C; // type:function size:0x20
getOption__13acAnimCmdImplCFv = .text:0x8013CA5C; // type:function size:0x1C
getArg__13acAnimCmdImplCFP8acCmdArgl = .text:0x8013CA78; // type:function size:0xE4
isArgEmpty__13acAnimCmdImplCFv = .text:0x8013CB5C; // type:function size:0x34
getArgList__13acAnimCmdImplFv = .text:0x8013CB90; // type:function size:0xA4
isValid__13acAnimCmdImplCFv = .text:0x8013CC34; // type:function size:0x34
__dt__41soArrayContractibleTable<C12acCmdArgConv>Fv = .text:0x8013CC68; // type:function size:0x40
isEmpty__29soArrayFixed<C12acCmdArgConv>CFv = .text:0x8013CCA8; // type:function size:0x34
at__41soArrayContractibleTable<C12acCmdArgConv>FUl = .text:0x8013CCDC; // type:function size:0x10
at__41soArrayContractibleTable<C12acCmdArgConv>Fi = .text:0x8013CCEC; // type:function size:0x10
shift__41soArrayContractibleTable<C12acCmdArgConv>Fv = .text:0x8013CCFC; // type:function size:0x90
pop__41soArrayContractibleTable<C12acCmdArgConv>Fv = .text:0x8013CD8C; // type:function size:0x7C
clear__41soArrayContractibleTable<C12acCmdArgConv>Fv = .text:0x8013CE08; // type:function size:0x54
size__41soArrayContractibleTable<C12acCmdArgConv>CFv = .text:0x8013CE5C; // type:function size:0x60
isNull__41soArrayContractibleTable<C12acCmdArgConv>CFv = .text:0x8013CEBC; // type:function size:0x8
atSub__41soArrayContractibleTable<C12acCmdArgConv>Fl = .text:0x8013CEC4; // type:function size:0x40
__dt__13acAnimCmdNullFv = .text:0x8013CF04; // type:function size:0x40
getOption__13acAnimCmdNullCFv = .text:0x8013CF44; // type:function size:0x8
isValid__13acAnimCmdNullCFv = .text:0x8013CF4C; // type:function size:0x8
isArgEmpty__13acAnimCmdNullCFv = .text:0x8013CF54; // type:function size:0x8
getCmdAddress__13acAnimCmdNullCFv = .text:0x8013CF5C; // type:function size:0x8
getArg__13acAnimCmdNullCFP8acCmdArgl = .text:0x8013CF64; // type:function size:0x1C
getArgList__13acAnimCmdNullFv = .text:0x8013CF80; // type:function size:0x20
getArgNum__13acAnimCmdNullCFv = .text:0x8013CFA0; // type:function size:0x8
getType__13acAnimCmdNullCFv = .text:0x8013CFA8; // type:function size:0x8
getGroup__13acAnimCmdNullCFv = .text:0x8013CFB0; // type:function size:0x8
__sinit_\ac_null_cpp = .text:0x8013CFB8; // type:function size:0x4C scope:local
fn_8013D004 = .text:0x8013D004; // type:function size:0x40
fn_8013D044 = .text:0x8013D044; // type:function size:0xC
fn_8013D050 = .text:0x8013D050; // type:function size:0x28
Expand Down Expand Up @@ -16561,7 +16561,7 @@ lbl_804094E8 = .rodata:0x804094E8; // type:object size:0x20 align:4 data:float
lbl_80409508 = .rodata:0x80409508; // type:object size:0xC data:4byte
lbl_80409514 = .rodata:0x80409514; // type:object size:0xC data:4byte
systemCmdFuncTable = .rodata:0x80409520; // type:object size:0x12C scope:local
lbl_80409650 = .rodata:0x80409650; // type:object size:0x10 align:8
g_80409650 = .rodata:0x80409650; // type:object size:0xC scope:local align:8
lbl_80409660 = .rodata:0x80409660; // type:object size:0x100
lbl_80409760 = .rodata:0x80409760; // type:object size:0x10
lbl_80409770 = .rodata:0x80409770; // type:object size:0x14 data:4byte
Expand Down Expand Up @@ -17835,7 +17835,7 @@ lbl_80423928 = .data:0x80423928; // type:object size:0xC
lbl_80423934 = .data:0x80423934; // type:object size:0xC data:string
lbl_80423940 = .data:0x80423940; // type:object size:0x18
lbl_80423958 = .data:0x80423958; // type:object size:0x28
lbl_80423980 = .data:0x80423980; // type:object size:0x7450
lbl_80423980 = .data:0x80423980; // type:object size:0x7450 noreloc
lbl_8042ADD0 = .data:0x8042ADD0; // type:object size:0x10
lbl_8042ADE0 = .data:0x8042ADE0; // type:object size:0x10 data:string
lbl_8042ADF0 = .data:0x8042ADF0; // type:object size:0x18
Expand Down Expand Up @@ -26071,16 +26071,15 @@ lbl_8045DDDC = .data:0x8045DDDC; // type:object size:0x14 data:string
__vt__13acAnimCmdImpl = .data:0x8045DDF0; // type:object size:0x34
lbl_8045DE24 = .data:0x8045DE24; // type:object size:0x10
lbl_8045DE34 = .data:0x8045DE34; // type:object size:0x14
lbl_8045DE48 = .data:0x8045DE48; // type:object size:0x30
__vt__41soArrayContractibleTable<C12acCmdArgConv> = .data:0x8045DE48; // type:object size:0x30
lbl_8045DE78 = .data:0x8045DE78; // type:object size:0x30
lbl_8045DEA8 = .data:0x8045DEA8; // type:object size:0x28
lbl_8045DED0 = .data:0x8045DED0; // type:object size:0x28 data:string
lbl_8045DEF8 = .data:0x8045DEF8; // type:object size:0x14
lbl_8045DF0C = .data:0x8045DF0C; // type:object size:0x24
lbl_8045DF30 = .data:0x8045DF30; // type:object size:0xC
lbl_8045DF3C = .data:0x8045DF3C; // type:object size:0x34 data:string
lbl_8045DF70 = .data:0x8045DF70; // type:object size:0x8 data:string
lbl_8045DF78 = .data:0x8045DF78; // type:object size:0x34
lbl_8045DF3C = .data:0x8045DF3C; // type:object size:0x3C data:string
__vt__13acAnimCmdNull = .data:0x8045DF78; // type:object size:0x34
lbl_8045DFAC = .data:0x8045DFAC; // type:object size:0x10
lbl_8045DFBC = .data:0x8045DFBC; // type:object size:0x14
lbl_8045DFD0 = .data:0x8045DFD0; // type:object size:0xC
Expand Down Expand Up @@ -29580,15 +29579,15 @@ lbl_8059E6B8 = .sdata:0x8059E6B8; // type:object size:0x8 data:string
lbl_8059E6C0 = .sdata:0x8059E6C0; // type:object size:0x8 data:string
lbl_8059E6C8 = .sdata:0x8059E6C8; // type:object size:0x8
__RTTI__16acCmdInterpreter = .sdata:0x8059E6D0; // type:object size:0x8
lbl_8059E6D8 = .sdata:0x8059E6D8; // type:object size:0x8
__RTTI__9acAnimCmd = .sdata:0x8059E6D8; // type:object size:0x8
__RTTI__10soNullable = .sdata:0x8059E6E0; // type:object size:0x8
lbl_8059E6E8 = .sdata:0x8059E6E8; // type:object size:0x8
lbl_8059E6F0 = .sdata:0x8059E6F0; // type:object size:0x8
lbl_8059E6F8 = .sdata:0x8059E6F8; // type:object size:0x8
lbl_8059E700 = .sdata:0x8059E700; // type:object size:0x8
lbl_8059E708 = .sdata:0x8059E708; // type:object size:0x8
lbl_8059E710 = .sdata:0x8059E710; // type:object size:0x8
lbl_8059E718 = .sdata:0x8059E718; // type:object size:0x8
__RTTI__19soNullableInterface = .sdata:0x8059E6E8; // type:object size:0x8
__RTTI__13acAnimCmdImpl = .sdata:0x8059E6F0; // type:object size:0x8
__RTTI__41soArrayContractibleTable<C12acCmdArgConv> = .sdata:0x8059E6F8; // type:object size:0x8
__RTTI__36soArrayContractible<C12acCmdArgConv> = .sdata:0x8059E700; // type:object size:0x8
__RTTI__29soArrayFixed<C12acCmdArgConv> = .sdata:0x8059E708; // type:object size:0x8
__RTTI__58soConnectable<41soArrayContractibleTable<C12acCmdArgConv>> = .sdata:0x8059E710; // type:object size:0x8
__RTTI__13acAnimCmdNull = .sdata:0x8059E718; // type:object size:0x8
lbl_8059E720 = .sdata:0x8059E720; // type:object size:0x8
lbl_8059E728 = .sdata:0x8059E728; // type:object size:0x4
lbl_8059E72C = .sdata:0x8059E72C; // type:object size:0x8
Expand Down Expand Up @@ -30801,7 +30800,7 @@ lbl_805A0350 = .sbss:0x805A0350; // type:object size:0x8 data:4byte
lbl_805A0358 = .sbss:0x805A0358; // type:object size:0x8 data:byte
lbl_805A0360 = .sbss:0x805A0360; // type:object size:0x8 data:4byte
lbl_805A0368 = .sbss:0x805A0368; // type:object size:0x8 data:4byte
lbl_805A0370 = .sbss:0x805A0370; // type:object size:0x8 data:4byte
g_acCmdArg = .sbss:0x805A0370; // type:object size:0x8 data:4byte
g_acAnimCmdNull = .sbss:0x805A0378; // type:object size:0x8 data:4byte
lbl_805A0380 = .sbss:0x805A0380; // type:object size:0x8 data:4byte
lbl_805A0388 = .sbss:0x805A0388; // type:object size:0x8 data:4byte
Expand Down
2 changes: 2 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ def MatchingFor(*versions):
"objects": [
Object(Matching, "sora/mt/mt_prng.cpp", extra_cflags=["-RTTI off"]),
Object(NonMatching, "sora/ac/ac_cmd_interpreter.cpp"),
Object(Matching, "sora/ac/ac_anim_cmd_impl.cpp"),
Object(Matching, "sora/ac/ac_null.cpp"),
],
},
# Common REL units
Expand Down
60 changes: 60 additions & 0 deletions src/sora/ac/ac_anim_cmd_impl.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#include <ac/ac_anim_cmd_impl.h>
#include <so/so_array.h>
#include <types.h>

s8 acAnimCmdImpl::getGroup() const {
return cmdAddr->group;
}

s8 acAnimCmdImpl::getType() const {
return cmdAddr->type;
}

s32 acAnimCmdImpl::getArgNum() const {
return (!cmdAddr) ? 0 : cmdAddr->argNum;
}

u8 acAnimCmdImpl::getOption() const {
return (!cmdAddr) ? 0 : cmdAddr->option;
}

bool acAnimCmdImpl::getArg(acCmdArg* arg, s32 index) const {
if (isArgEmpty() == true || !cmdAddr->args) {
*arg = g_acCmdArg;
return false;
}
if (index < 0 || index >= getArgNum()) {
*arg = g_acCmdArg;
return false;
}
arg->setDataPtr(cmdAddr->args + index);
arg->setNull(false);
return true;
}

bool acAnimCmdImpl::isArgEmpty() const {
return !getArgNum();
}

soArrayContractibleTable<const acCmdArgConv> acAnimCmdImpl::getArgList() {
s32 argNum;
const acCmdArgConv* args;
if ((argNum = getArgNum()) <= 0 ||
(args = cmdAddr->args) == 0) {
return soArrayContractibleTable<const acCmdArgConv>();
} else {
return soArrayContractibleTable<const acCmdArgConv>(args, argNum);
}
}

bool acAnimCmdImpl::isValid() const {
if (!cmdAddr || cmdAddr->type < 0 || cmdAddr->group < 0) {
return false;
}
return true;
}

// TODO: inferred deadstripped function to correct function ordering
acCmdArgList acAnimCmdImpl::getEmptyArgList() {
return acCmdArgList();
}
48 changes: 48 additions & 0 deletions src/sora/ac/ac_null.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#include <ac/ac_anim_cmd_impl.h>
#include <so/so_array.h>
#include <types.h>

// TODO: Determine if this data is referenced anywhere
extern const u32 g_80409650[3] = { 0, 2, 11 };

acCmdArg g_acCmdArg;
acAnimCmdNull g_acAnimCmdNull;

acAnimCmdNull::~acAnimCmdNull() { }

u8 acAnimCmdNull::getOption() const {
return 0;
}

bool acAnimCmdNull::isValid() const {
return false;
}

bool acAnimCmdNull::isArgEmpty() const {
return true;
}

const acAnimCmdConv* acAnimCmdNull::getCmdAddress() const {
return 0;
}

bool acAnimCmdNull::getArg(acCmdArg* arg, s32 index) const {
*arg = g_acCmdArg;
return false;
}

soArrayContractibleTable<const acCmdArgConv> acAnimCmdNull::getArgList() {
return soArrayContractibleTable<const acCmdArgConv>();
}

s32 acAnimCmdNull::getArgNum() const {
return 0;
}

s8 acAnimCmdNull::getType() const {
return -1;
}

s8 acAnimCmdNull::getGroup() const {
return -1;
}