Match and link CCallStackDolphin

This commit is contained in:
Phillip Stephens 2022-10-14 08:46:40 -07:00
parent 14bf190ed2
commit 2606c5f4a1
9 changed files with 54 additions and 19 deletions

View File

@ -990,9 +990,9 @@ __ct__14CGuiTableGroupFRCQ210CGuiWidget15CGuiWidgetParmsiiQ214CGuiTableGroup16ET
/* 802C7234 002C4194 38 7C 00 B8 */ addi r3, r28, 0xb8
/* 802C7238 002C4198 38 04 C9 70 */ addi r0, r4, lbl_803EC970@l
/* 802C723C 002C419C 90 1C 00 00 */ stw r0, 0(r28)
/* 802C7240 002C41A0 48 00 62 7D */ bl sub_802cd4bc
/* 802C7240 002C41A0 48 00 62 7D */ bl __ct__Q214CGuiTableGroup12CRepeatStateFv
/* 802C7244 002C41A4 38 7C 00 BC */ addi r3, r28, 0xbc
/* 802C7248 002C41A8 48 00 62 75 */ bl sub_802cd4bc
/* 802C7248 002C41A8 48 00 62 75 */ bl __ct__Q214CGuiTableGroup12CRepeatStateFv
/* 802C724C 002C41AC 93 BC 00 C0 */ stw r29, 0xc0(r28)
/* 802C7250 002C41B0 38 C0 00 01 */ li r6, 1
/* 802C7254 002C41B4 38 00 00 00 */ li r0, 0

View File

@ -34,8 +34,8 @@ lbl_802CD4B4:
/* 802CD4B4 002CA414 54 A3 06 3E */ clrlwi r3, r5, 0x18
/* 802CD4B8 002CA418 4E 80 00 20 */ blr
.global sub_802cd4bc
sub_802cd4bc:
.global __ct__Q214CGuiTableGroup12CRepeatStateFv
__ct__Q214CGuiTableGroup12CRepeatStateFv:
/* 802CD4BC 002CA41C C0 02 C4 70 */ lfs f0, lbl_805AE190@sda21(r2)
/* 802CD4C0 002CA420 D0 03 00 00 */ stfs f0, 0(r3)
/* 802CD4C4 002CA424 4E 80 00 20 */ blr
@ -57,4 +57,3 @@ lbl_805AE198:
# ROM: 0x3FAA38
.4byte 0x3D4CCCCD
.4byte 0

View File

@ -17,12 +17,3 @@ __ct__10CCallStackFUiPCcPCc:
/* 802D63D4 002D3334 90 A3 00 00 */ stw r5, 0(r3)
/* 802D63D8 002D3338 90 C3 00 04 */ stw r6, 4(r3)
/* 802D63DC 002D333C 4E 80 00 20 */ blr
.section .rodata
.balign 8
.global lbl_803D6AA8
lbl_803D6AA8:
# ROM: 0x3D3AA8
.asciz "UnknownType"
.4byte 0

View File

@ -0,0 +1,32 @@
# Once all references to this string are accounted for this can be removed entirely
# CARAMManager
# CARAMToken
# CResFactory
# CResLoader
# DolphinCDvdFile
# DolphinCMemoryCardSys
# CSegStatementSet
# DolphinCSkinnedModel
# CStaticAudioPlayer
# DolphinCAudioGroupSet
# SDSPStream
# CCubeMoviePlayer
# DolphinCPalette
# DolphinCTexture
# CParticleElectric
# CGameArea
# CGBASupport
# CMemoryCardDriver
# CNESEmulator
# CPauseScreen
# CWorld
# main
# Unfortunately none of these can be linked until they can all be linked at once
.section .rodata
.balign 8
.global lbl_803D6AA8
lbl_803D6AA8:
# ROM: 0x3D3AA8
.asciz "UnknownType"
.4byte 0

View File

@ -483,7 +483,8 @@ LIBS = [
"Kyoto/Basics/CBasics",
["Kyoto/Basics/CStopwatch", True],
"Kyoto/Basics/CBasicsDolphin",
"Kyoto/Basics/CCallStackDolphin",
["Kyoto/Alloc/CCallStackUnknownType", False], # This is a hack until all usages of CCallStack's constructor are accounted for
["Kyoto/Alloc/CCallStackDolphin", True],
["Kyoto/Basics/COsContextDolphin", True],
["Kyoto/Basics/CSWDataDolphin", True],
"Kyoto/Basics/RAssertDolphin",

View File

@ -1,13 +1,15 @@
#ifndef _CCALLSTACK
#define _CCALLSTACK
#include <types.h>
class CCallStack {
public:
CCallStack(uint lineNum, const char* lineStr, const char* type);
CCallStack(uint lineNum, const char* lineStr, const char* type = "UnknownType");
const char* GetFileAndLineText() const;
const char* GetTypeText() const;
private:
const char* x0_line;
const char* x4_type;

View File

@ -34,4 +34,5 @@ SECTIONS
FORCEFILES
{
}

View File

@ -421,8 +421,9 @@ COLLISION :=\
KYOTO_1 :=\
$(BUILD_DIR)/asm/Kyoto/Basics/CBasics.o\
$(BUILD_DIR)/src/Kyoto/Basics/CStopwatch.o\
$(BUILD_DIR)/asm/Kyoto/Basics/CBasicsDolphin.o\
$(BUILD_DIR)/asm/Kyoto/Basics/CCallStackDolphin.o\
$(BUILD_DIR)/asm/Kyoto/Basics/CBasicsUnknownType.o\
$(BUILD_DIR)/src/Kyoto/Basics/CBasicsDolphin.o\
$(BUILD_DIR)/src/Kyoto/Alloc/CCallStackDolphin.o\
$(BUILD_DIR)/src/Kyoto/Basics/COsContextDolphin.o\
$(BUILD_DIR)/src/Kyoto/Basics/CSWDataDolphin.o\
$(BUILD_DIR)/asm/Kyoto/Basics/RAssertDolphin.o\

View File

@ -0,0 +1,8 @@
#include "Kyoto/Alloc/CCallStack.hpp"
CCallStack::CCallStack(uint lineNum, const char* fileAndLine, const char* type)
: x0_line(fileAndLine), x4_type(type) {}
const char* CCallStack::GetFileAndLineText() const { return x0_line; }
const char* CCallStack::GetTypeText() const { return x4_type; }