Split mslsupp.c rename TRK functions

Former-commit-id: 1974f6fc22
This commit is contained in:
Phillip Stephens 2022-04-11 21:53:51 -07:00
parent b96bbbad88
commit 37584253a3
8 changed files with 50 additions and 29 deletions

View File

@ -52,12 +52,12 @@ ifeq ($(EPILOGUE_PROCESS),1)
include e_files.mk
endif
O_FILES := $(INIT_O_FILES) $(EXTAB_O_FILES) $(EXTABINDEX_O_FILES) $(KYOTO_CWD) \
$(CTORS_O_FILES) $(DTORS_O_FILES) $(RODATA_O_FILES) $(DATA_O_FILES) \
$(BSS_O_FILES) $(SDATA_O_FILES) $(SBSS_O_FILES) $(SDATA2_O_FILES) \
$(SBSS2_O_FILES) $(TEXT_O_FILES) $(AI_FILES) $(AR_FILES) $(BASE_FILES) \
$(DB_FILES) $(DSP_FILES) $(DVD_FILES) $(GX_FILES) $(MTX_FILES) $(OS_FILES) \
$(PAD_FILES) $(VI_FILES) $(MSL_PPCEABI_BARE_H) $(MUSYX_FILES) \
O_FILES := $(INIT_O_FILES) $(EXTAB_O_FILES) $(EXTABINDEX_O_FILES) $(METROTRK_FILES) \
$(KYOTO_CWD) $(CTORS_O_FILES) $(DTORS_O_FILES) $(RODATA_O_FILES) \
$(DATA_O_FILES) $(BSS_O_FILES) $(SDATA_O_FILES) $(SBSS_O_FILES) \
$(SDATA2_O_FILES) $(SBSS2_O_FILES) $(TEXT_O_FILES) $(AI_FILES) $(AR_FILES) \
$(BASE_FILES) $(DB_FILES) $(DSP_FILES) $(DVD_FILES) $(GX_FILES) $(MTX_FILES) \
$(OS_FILES) $(PAD_FILES) $(VI_FILES) $(MSL_PPCEABI_BARE_H) $(MUSYX_FILES) \
$(DTK_FILES) $(CARD_FILES) $(SI_FILES) $(EXI_FILES) $(THP_FILES) \
$(GBA_FILES) $(BSS_SINIT_O_FILES)

View File

@ -963,25 +963,7 @@ lbl_805A9D78:
# ROM: 0x3F6618
.4byte 0x41200000
.section .text, "ax"
.global EnableMetroTRKInterrupts
EnableMetroTRKInterrupts:
/* 80003640 000005A0 4E 80 00 20 */ blr
.global InitMetroTRK
InitMetroTRK:
/* 80003644 000005A4 4E 80 00 20 */ blr
.global sub_80003648
sub_80003648:
/* 80003648 000005A8 38 60 00 00 */ li r3, 0
/* 8000364C 000005AC 4E 80 00 20 */ blr
.global sub_80003650
sub_80003650:
/* 80003650 000005B0 38 60 00 00 */ li r3, 0
/* 80003654 000005B4 4E 80 00 20 */ blr
.global UpdateStreamedAudio__5CMainFv
UpdateStreamedAudio__5CMainFv:
@ -3365,7 +3347,7 @@ lbl_8000570C:
/* 80005718 00002678 90 1D 01 2C */ stw r0, 0x12c(r29)
/* 8000571C 0000267C 48 36 01 89 */ bl StopAll__19CStreamAudioManagerFv
/* 80005720 00002680 3C 60 F0 00 */ lis r3, 0xf000
/* 80005724 00002684 48 38 0D 39 */ bl sub_8038645c
/* 80005724 00002684 48 38 0D 39 */ bl PADRecalibrate
/* 80005728 00002688 38 60 00 01 */ li r3, 1
/* 8000572C 0000268C 48 30 3D 7D */ bl SetIsBeginSceneClearFb__9CGraphicsFb
/* 80005730 00002690 48 30 67 75 */ bl BeginScene__9CGraphicsFv

View File

@ -57,7 +57,7 @@ lbl_80391308:
/* 8039130C 0038E26C 7F A4 EB 78 */ mr r4, r29
/* 80391310 0038E270 7F C5 F3 78 */ mr r5, r30
/* 80391314 0038E274 7F E6 FB 78 */ mr r6, r31
/* 80391318 0038E278 4B C7 23 39 */ bl sub_80003650
/* 80391318 0038E278 4B C7 23 39 */ bl __TRK_write_console
/* 8039131C 0038E27C 38 60 00 00 */ li r3, 0
lbl_80391320:
/* 80391320 0038E280 80 01 00 24 */ lwz r0, 0x24(r1)

View File

@ -0,0 +1,14 @@
#ifndef __TRKINIT_H__
#define __TRKINIT_H__
#ifdef __cplusplus
extern "C" {
#endif
void InitMetroTRK(void);
void EnableMetroTRKInterrupts(void);
#ifdef __cplusplus
}
#endif
#endif /* #ifndef __TRKINIT_H__ */

View File

@ -39,4 +39,5 @@ FORCEFILES
extab.o
extabindex.o
uart_console_io.o
mslsupp.o
}

View File

@ -3,6 +3,9 @@ INIT_O_FILES :=\
$(BUILD_DIR)/src/os/__ppc_eabi_init.o\
$(BUILD_DIR)/asm/Runtime/__mem.o
METROTRK_FILES :=\
$(BUILD_DIR)/src/MetroTRK/mslsupp.o
KYOTO_CWD :=\
$(BUILD_DIR)/asm/Kyoto_CWD/main.o\
$(BUILD_DIR)/asm/Kyoto_CWD/text_80008894_80009144.o\

View File

@ -56,16 +56,16 @@ u32 sARAMMemArray[2];
bool lbl_805A6BC0;
// 80003640
void nullsub_1() {}
void EnableMetroTRKInterrupts() {}
// 80003644
void InitMetroTRK() {}
// 80003648
int sub_80003648() { return 0; }
int __read_console() { return 0; }
// 80003650
int sub_80003650() { return 0; }
int __TRK_write_console() { return 0; }
// 80003658
void CMain::UpdateStreamedAudio() { CStreamAudioManager::Update(1.f / 60.f); }

21
src/MetroTRK/mslsupp.c Normal file
View File

@ -0,0 +1,21 @@
#include "MetroTRK/TrkInit.h"
#ifdef __cplusplus
extern "C" {
#endif
// 80003640
void EnableMetroTRKInterrupts() {}
// 80003644
void InitMetroTRK() {}
// 80003648
int __read_console() { return 0; }
// 80003650
int __TRK_write_console() { return 0; }
#ifdef __cplusplus
}
#endif