From c674b48aba88d08a0fe7b0b895eed0d6538d67b5 Mon Sep 17 00:00:00 2001 From: DeathHound Date: Mon, 20 Apr 2026 21:19:30 +0100 Subject: [PATCH 01/15] Match + Link main_TRK.c --- config/SALP4Q/splits.txt | 4 + configure.py | 15 ++ src/PowerPC_EABI_Support/MetroTRK/main_TRK.c | 15 ++ src/PowerPC_EABI_Support/MetroTRK/mainloop.c | 68 ++++++ src/PowerPC_EABI_Support/MetroTRK/ppc_reg.h | 242 +++++++++++++++++++ src/PowerPC_EABI_Support/MetroTRK/trk.h | 225 +++++++++++++++++ src/PowerPC_EABI_Support/MetroTRK/trkenum.h | 212 ++++++++++++++++ src/PowerPC_EABI_Support/MetroTRK/trktypes.h | 144 +++++++++++ 8 files changed, 925 insertions(+) create mode 100644 src/PowerPC_EABI_Support/MetroTRK/main_TRK.c create mode 100644 src/PowerPC_EABI_Support/MetroTRK/mainloop.c create mode 100644 src/PowerPC_EABI_Support/MetroTRK/ppc_reg.h create mode 100644 src/PowerPC_EABI_Support/MetroTRK/trk.h create mode 100644 src/PowerPC_EABI_Support/MetroTRK/trkenum.h create mode 100644 src/PowerPC_EABI_Support/MetroTRK/trktypes.h diff --git a/config/SALP4Q/splits.txt b/config/SALP4Q/splits.txt index e12f05a..02be3cc 100644 --- a/config/SALP4Q/splits.txt +++ b/config/SALP4Q/splits.txt @@ -134,6 +134,10 @@ PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/secure_error.c: .text start:0x803A34AC end:0x803A34C4 .sbss start:0x805F5E48 end:0x805F5E4C +PowerPC_EABI_Support/MetroTRK/main_TRK.c: + .text start:0x803AADE0 end:0x803AAE1C + .sbss start:0x805F5E98 end:0x805F5E9C + Revolution/FS/fs.c: .text start:0x803B17D0 end:0x803B2BB4 .data start:0x8052D858 end:0x8052D87C diff --git a/configure.py b/configure.py index 65a4e96..ad8052d 100644 --- a/configure.py +++ b/configure.py @@ -328,6 +328,21 @@ def MatchingFor(*versions): Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/secure_error.c"), ] }, + { + "lib": "MetroTRK", + "mw_version": config.linker_version, + "cflags": [ + *cflags_base, + "-lang=c99", + "-use_lmw_stmw on", + "-func_align 4", + ], + "host": False, + "progress_category": "sdk", + "objects": [ + Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/main_TRK.c"), + ] + }, { "lib": "zlib", "mw_version": config.linker_version, diff --git a/src/PowerPC_EABI_Support/MetroTRK/main_TRK.c b/src/PowerPC_EABI_Support/MetroTRK/main_TRK.c new file mode 100644 index 0000000..368c407 --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/main_TRK.c @@ -0,0 +1,15 @@ +#include "PowerPC_EABI_Support/MetroTRK/trk.h" + +static DSError TRK_mainError; + +DSError TRK_main(void) +{ + TRK_mainError = TRKInitializeNub(); + + if (TRK_mainError == DS_NoError) { + TRKNubWelcome(); + TRKNubMainLoop(); + } + + return TRK_mainError = TRKTerminateNub(); +} diff --git a/src/PowerPC_EABI_Support/MetroTRK/mainloop.c b/src/PowerPC_EABI_Support/MetroTRK/mainloop.c new file mode 100644 index 0000000..2fbeba5 --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/mainloop.c @@ -0,0 +1,68 @@ +#include "PowerPC_EABI_Support/MetroTRK/trk.h" + +void TRKHandleRequestEvent(TRKEvent* event) +{ + TRKBuffer* buffer = TRKGetBuffer(event->msgBufID); + TRKDispatchMessage(buffer); +} + +void TRKHandleSupportEvent(TRKEvent* event) +{ + TRKTargetSupportRequest(); +} + +void TRKIdle() +{ + if (TRKTargetStopped() == FALSE) { + TRKTargetContinue(); + } +} + +void TRKNubMainLoop(void) +{ + TRKEvent event; + BOOL isShutdownRequested; + BOOL isNewInput; + + isShutdownRequested = FALSE; + isNewInput = FALSE; + while (isShutdownRequested == FALSE) { + if (TRKGetNextEvent(&event) != FALSE) { + isNewInput = FALSE; + + switch (event.eventType) { + case NUBEVENT_Null: + break; + + case NUBEVENT_Request: + TRKHandleRequestEvent(&event); + break; + + case NUBEVENT_Shutdown: + isShutdownRequested = TRUE; + break; + + case NUBEVENT_Breakpoint: + case NUBEVENT_Exception: + TRKTargetInterrupt(&event); + break; + + case NUBEVENT_Support: + TRKHandleSupportEvent(&event); + break; + } + + TRKDestructEvent(&event); + continue; + } + + if ((isNewInput == FALSE) || (*(u8*)gTRKInputPendingPtr != '\0')) { + isNewInput = TRUE; + TRKGetInput(); + continue; + } + + TRKIdle(); + isNewInput = FALSE; + } +} diff --git a/src/PowerPC_EABI_Support/MetroTRK/ppc_reg.h b/src/PowerPC_EABI_Support/MetroTRK/ppc_reg.h new file mode 100644 index 0000000..e09c593 --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/ppc_reg.h @@ -0,0 +1,242 @@ +#ifndef _PPC_REG_H + #define _PPC_REG_H + + #include "types.h" + + #ifdef __cplusplus + extern "C" { + #endif + + typedef struct Default_PPC { + u32 GPR[32]; + u32 PC; + u32 LR; + u32 CR; + u32 CTR; + u32 XER; + } Default_PPC; + + typedef struct Float_PPC { + u64 FPR[32]; + u64 FPSCR; + u64 FPECR; + } Float_PPC; + + typedef struct Extended1_PPC_6xx_7xx { + // u8 pad[0x168]; + u32 SR[16]; + u32 TBL; + u32 TBU; + u32 HID0_; + u32 HID1; + u32 MSR; + u32 PVR; + u32 IBAT0U; + u32 IBAT0L; + u32 IBAT1U; + u32 IBAT1L; + u32 IBAT2U; + u32 IBAT2L; + u32 IBAT3U; + u32 IBAT3L; + u32 DBAT0U; + u32 DBAT0L; + u32 DBAT1U; + u32 DBAT1L; + u32 DBAT2U; + u32 DBAT2L; + u32 DBAT3U_; + u32 DBAT3L_; + u32 DMISS; + u32 DCMP; + u32 HASH1; + u32 HASH2; + u32 IMISS; + u32 ICMP; + u32 RPA; + u32 SDR1; + u32 DAR; + u32 DSISR; + u32 SPRG0; + u32 SPRG1; + u32 SPRG2; + u32 SPRG3; + u32 DEC; + u32 IABR; + u32 EAR; + u32 DABR; + u32 PMC1; + u32 PMC2; + u32 PMC3; + u32 PMC4; + u32 SIA; + u32 MMCR0; + u32 MMCR1; + u32 THRM1; + u32 THRM2; + u32 THRM3; + u32 ICTC; + u32 L2CR; + u32 UMMCR2; + u32 UBAMR; + u32 UMMCR0; + u32 UPMC1; + u32 UPMC2; + u32 USIA; + u32 UMMCR1; + u32 UPMC3; + u32 UPMC4; + u32 USDA; + u32 MMCR2; + u32 BAMR; + u32 SDA; + u32 MSSCR0; + u32 MSSCR1; + u32 PIR; + u32 exceptionID; + u32 GQR[8]; + u32 HID_G; + u32 WPAR; + u32 DMA_U_; + u32 DMA_L_; + } Extended1_PPC_6xx_7xx; + + typedef struct Extended2_PPC_6xx_7xx { + u32 PSR[32][2]; + } Extended2_PPC_6xx_7xx; + + typedef struct ProcessorState_PPC_6xx_7xx { + Default_PPC Default; + Float_PPC Float; + Extended1_PPC_6xx_7xx Extended1; + Extended2_PPC_6xx_7xx Extended2; + u32 transport_handler_saved_ra; + } ProcessorState_PPC_6xx_7xx; + + typedef ProcessorState_PPC_6xx_7xx ProcessorState_PPC; + + #define SPR_XER 1 + #define SPR_LR 8 + #define SPR_CTR 9 + #define SPR_DSISR 18 + #define SPR_DAR 19 + #define SPR_DEC 22 + #define SPR_SDR1 25 + #define SPR_SRR0 26 + #define SPR_SRR1 27 + #define SPR_SPRG0 272 + #define SPR_SPRG1 273 + #define SPR_SPRG2 274 + #define SPR_SPRG3 275 + #define SPR_EAR 282 + #define SPR_TBL 284 + #define SPR_TBU 285 + #define SPR_PVR 287 + #define SPR_IBAT0U 528 + #define SPR_IBAT0L 529 + #define SPR_IBAT1U 530 + #define SPR_IBAT1L 531 + #define SPR_IBAT2U 532 + #define SPR_IBAT2L 533 + #define SPR_IBAT3U 534 + #define SPR_IBAT3L 535 + #define SPR_IBAT4U 560 + #define SPR_IBAT4L 561 + #define SPR_IBAT5U 562 + #define SPR_IBAT5L 563 + #define SPR_IBAT6U 564 + #define SPR_IBAT6L 565 + #define SPR_IBAT7U 566 + #define SPR_IBAT7L 567 + #define SPR_DBAT0U 536 + #define SPR_DBAT0L 537 + #define SPR_DBAT1U 538 + #define SPR_DBAT1L 539 + #define SPR_DBAT2U 540 + #define SPR_DBAT2L 541 + #define SPR_DBAT3U 542 + #define SPR_DBAT3L 543 + #define SPR_DBAT4U 568 + #define SPR_DBAT4L 569 + #define SPR_DBAT5U 570 + #define SPR_DBAT5L 571 + #define SPR_DBAT6U 572 + #define SPR_DBAT6L 573 + #define SPR_DBAT7U 574 + #define SPR_DBAT7L 575 + #define SPR_GQR0 912 + #define SPR_GQR1 913 + #define SPR_GQR2 914 + #define SPR_GQR3 915 + #define SPR_GQR4 916 + #define SPR_GQR5 917 + #define SPR_GQR6 918 + #define SPR_GQR7 919 + #define SPR_HID2 920 + #define SPR_WPAR 921 + #define SPR_DMA_U 922 + #define SPR_DMA_L 923 + #define SPR_UMMCR0 936 + #define SPR_UPMC1 937 + #define SPR_UPMC2 938 + #define SPR_USIA 939 + #define SPR_UMMCR1 940 + #define SPR_UPMC3 941 + #define SPR_UPMC4 942 + #define SPR_USDA 943 + #define SPR_MMCR0 952 + #define SPR_PMC1 953 + #define SPR_PMC2 954 + #define SPR_SIA 955 + #define SPR_MMCR1 956 + #define SPR_PMC3 957 + #define SPR_PMC4 958 + #define SPR_SDA 959 + #define SPR_HID0 1008 + #define SPR_HID1 1009 + #define SPR_IABR 1010 + #define SPR_HID4 1011 + #define SPR_DABR 1013 + #define SPR_L2CR 1017 + #define SPR_ICTC 1019 + #define SPR_THRM1 1020 + #define SPR_THRM2 1021 + #define SPR_FPECR 1022 + + // PPC exceptions + // 0x000 is reserved + #define PPC_SystemReset 0x100 + #define PPC_MachineCheck 0x200 + #define PPC_DataStorage 0x300 + #define PPC_InstructionStorage 0x400 + #define PPC_ExternalInterrupt 0x500 + #define PPC_Alignment 0x600 + #define PPC_Program 0x700 + #define PPC_FloatingPointUnavaiable 0x800 + #define PPC_Decrementer 0x900 + // 0xA00-0xB00 are reserved + #define PPC_SystemCall 0xC00 + #define PPC_Trace 0xD00 + #define PPC_FloatingPointAssist 0xE00 // unimplemented in 750CL + #define PPC_PerformanceMonitor 0xF00 // Dolphin/Broadway specific + // 0x1000-0x1200 are unimplemented in 750CL + #define PPC_InstructionAddressBreakpoint 0x1300 // Dolphin/Broadway specific + // 0x1400-0x2F00 are reserved, but TRK uses some + #define PPC_SystemManagementInterrupt 0x1400 + // 0x1500-0x1600 are unimplemented in 750CL + #define PPC_ThermalManagementInterrupt 0x1700 + #define PPC_1800Exception 0x1800 + #define PPC_1900Exception 0x1900 + #define PPC_1A00Exception 0x1A00 + #define PPC_1B00Exception 0x1B00 + #define PPC_1C00Exception 0x1C00 // Data breakpoint? + #define PPC_1D00Exception 0x1D00 // Instruction breakpoint? + #define PPC_1E00Exception 0x1E00 // Peripheral breakpoint? + #define PPC_1F00Exception 0x1F00 // Non maskable development port? + #define PPC_2000Exception 0x2000 + + #ifdef __cplusplus + } + #endif + +#endif diff --git a/src/PowerPC_EABI_Support/MetroTRK/trk.h b/src/PowerPC_EABI_Support/MetroTRK/trk.h new file mode 100644 index 0000000..459f5c3 --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/trk.h @@ -0,0 +1,225 @@ +#ifndef _REVOSDK_TRK_H + #define _REVOSDK_TRK_H + + #include "PowerPC_EABI_Support/MetroTRK/ppc_reg.h" + #include "PowerPC_EABI_Support/MetroTRK/trktypes.h" + #include "types.h" + #include "PowerPC_EABI_Support/MSL/MSL_C/stddef.h" // IWYU pragma: export + + #ifdef __cplusplus + extern "C" { + #endif + + ////// MSG HANDLING FUNCTIONS ////// + DSError TRKDoConnect(TRKBuffer*); + DSError TRKDoDisconnect(TRKBuffer*); + DSError TRKDoReset(TRKBuffer*); + DSError TRKDoVersions(TRKBuffer*); + DSError TRKDoSupportMask(TRKBuffer*); + DSError TRKDoOverride(TRKBuffer*); + DSError TRKDoReadMemory(TRKBuffer*); + DSError TRKDoWriteMemory(TRKBuffer*); + DSError TRKDoReadRegisters(TRKBuffer*); + DSError TRKDoWriteRegisters(TRKBuffer*); + DSError TRKDoSetOption(TRKBuffer*); + DSError TRKDoContinue(TRKBuffer*); + DSError TRKDoStep(TRKBuffer*); + DSError TRKDoStop(TRKBuffer*); + DSError TRKDoUnsupported(TRKBuffer*); + DSError TRKDoCPUType(TRKBuffer*); + DSError TRKDoFlushCache(TRKBuffer*); + + void __TRK_copy_vectors(); + + void SetBufferPosition(TRKBuffer*, u32); + void SetTRKConnected(int); + int GetTRKConnected(void); + + DSError TRKGetFreeBuffer(int*, TRKBuffer**); + void OutputData(void* data, int length); + void TRKResetBuffer(TRKBuffer* msg, u8 keepData); + + DSError TRKReadBuffer_ui8(TRKBuffer* buffer, u8* data, int count); + DSError TRKReadBuffer_ui32(TRKBuffer* buffer, u32* data, int count); + + DSError TRKReadBuffer1_ui8(TRKBuffer* buffer, u8* data); + DSError TRKReadBuffer1_ui16(TRKBuffer* buffer, u16* data); + DSError TRKReadBuffer1_ui32(TRKBuffer* buffer, u32* data); + DSError TRKReadBuffer1_ui64(TRKBuffer* buffer, u64* data); + + DSError TRKAppendBuffer_ui8(TRKBuffer* buffer, const u8* data, int count); + DSError TRKAppendBuffer_ui32(TRKBuffer* buffer, const u32* data, int count); + DSError TRKAppendBuffer1_ui16(TRKBuffer* buffer, const u16 data); + DSError TRKAppendBuffer1_ui32(TRKBuffer* buffer, const u32 data); + DSError TRKAppendBuffer1_ui64(TRKBuffer* buffer, const u64 data); + //////////////////////////////////// + + /////// DOLPHIN TRK FUNCTIONS ////// + void InitMetroTRK(void); + void InitMetroTRK_BBA(void); + void EnableMetroTRKInterrupts(void); + + void TRKLoadContext(struct OSContext* ctx, u32); + void TRKSaveExtended1Block(); + void TRKRestoreExtended1Block(); + int InitMetroTRKCommTable(int); + void TRK_board_display(const char*); + //////////////////////////////////// + + ////////// GDEV FUNCTIONS ////////// + int gdev_cc_initialize(void* flagOut, OSInterruptHandler handler); + int gdev_cc_shutdown(); + int gdev_cc_open(); + int gdev_cc_close(); + int gdev_cc_read(u8* dest, int size); + int gdev_cc_write(const u8* src, int size); + int gdev_cc_pre_continue(); + int gdev_cc_post_stop(); + int gdev_cc_peek(); + int gdev_cc_initinterrupts(); + //////////////////////////////////// + + /////////// UDP FUNCTIONS ////////// + int udp_cc_initialize(void* flagOut, OSInterruptHandler handler); + int udp_cc_shutdown(); + int udp_cc_open(); + int udp_cc_close(); + int udp_cc_read(u8* dest, int size); + int udp_cc_write(const u8* src, int size); + int udp_cc_pre_continue(); + int udp_cc_post_stop(); + int udp_cc_peek(); + int udp_cc_initinterrupts(); + //////////////////////////////////// + + /////////// DDH FUNCTIONS ////////// + #define DDH_ERR_NOT_INITIALIZED -0x2711 + #define DDH_ERR_ALREADY_INITIALIZED -0x2715 + #define DDH_ERR_READ_ERROR -0x2719 + + int ddh_cc_initialize(void* flagOut, OSInterruptHandler handler); + int ddh_cc_shutdown(); + int ddh_cc_open(); + int ddh_cc_close(); + int ddh_cc_read(u8* dest, int size); + int ddh_cc_write(const u8* src, int size); + int ddh_cc_pre_continue(); + int ddh_cc_post_stop(); + int ddh_cc_peek(); + int ddh_cc_initinterrupts(); + //////////////////////////////////// + + ////////// EVENT FUNCTIONS ///////// + void TRKConstructEvent(TRKEvent* event, int eventType); + void TRKDestructEvent(TRKEvent* event); + DSError TRKPostEvent(TRKEvent* event); + BOOL TRKGetNextEvent(TRKEvent* event); + DSError TRKDispatchMessage(TRKBuffer*); + void* TRKGetBuffer(int); + void TRKReleaseBuffer(int); + void TRKGetInput(); + //////////////////////////////////// + + ///////// TARGET FUNCTIONS ///////// + DSError TRKTargetContinue(void); + DSError TRKTargetInterrupt(TRKEvent*); + BOOL TRKTargetStopped(); + void TRKTargetSetStopped(uint); + DSError TRKTargetSupportRequest(); + //////////////////////////////////// + + ////// NUB AND MEM FUNCTIONS /////// + DSError TRKAppendBuffer_ui8(TRKBuffer*, const u8*, int); + DSError TRKSetBufferPosition(TRKBuffer*, u32); + + DSError TRKMessageSend(TRKBuffer*); + void TRKSwapAndGo(void); + DSError TRKInitializeNub(void); + DSError TRKTerminateNub(void); + void TRKNubWelcome(void); + void TRKNubMainLoop(void); + + DSError TRKInitializeMutex(void*); + DSError TRKAcquireMutex(void*); + DSError TRKReleaseMutex(void*); + void* TRK_memcpy(void* dst, const void* src, size_t n); + //////////////////////////////////// + + /////// INITIALIZE FUNCTIONS /////// + DSError TRKInitializeEventQueue(); + DSError TRKInitializeMessageBuffers(); + DSError TRKInitializeDispatcher(); + DSError InitializeProgramEndTrap(); + DSError TRKInitializeSerialHandler(); + DSError TRKTerminateSerialHandler(); + DSError TRKInitializeTarget(); + //////////////////////////////////// + + ////////// EXI2 FUNCTIONS ////////// + /* EXI2 */ + void UnreserveEXI2Port(void); + void ReserveEXI2Port(void); + //////////////////////////////////// + + /////////// MW FUNCTIONS /////////// + void MWTRACE(u8, const char*, ...); + //////////////////////////////////// + + //////// SUPPORT FUNCTIONS ///////// + DSError TRKRequestSend(); + u32 TRKAccessFile(u32, u32, u32*, u8*); + //////////////////////////////////// + + ///// SERIAL POLLING FUNCTIONS ///// + TRKBufferID TRKTestForPacker(); + void TRKGetInput(); + void TRKProcessInput(TRKBufferID bufID); + //////////////////////////////////// + + ////////// OTHER FUNCTIONS ///////// + DSError TRK_main(void); + UARTError InitializeUART(UARTBaudRate baudRate); + DSError TRKInitializeIntDrivenUART(u32, u32, u32, volatile u8**); + int TRKPollUART(); + UARTError TRKReadUARTN(void*, u32); + UARTError TRKWriteUARTN(const void* bytes, u32 length); + void usr_put_initialize(); + void TRKTargetSetInputPendingPtr(void*); + void SetUseSerialIO(u8); + u8 GetUseSerialIO(void); + u8 TRKTargetCPUMinorType(); + + DSError TRKTargetAddStopInfo(TRKBuffer*); + DSError TRKTargetAddExceptionInfo(TRKBuffer*); + void TRKInterruptHandler(); + BOOL usr_puts_serial(const char* msg); + //////////////////////////////////// + + //////// EXTERNAL DECLARES ///////// + extern BOOL gTRKBigEndian; + extern void* gTRKInputPendingPtr; + extern ProcessorState_PPC gTRKCPUState; + extern ProcessorRestoreFlags_PPC gTRKRestoreFlags; + extern u8 gTRKInterruptVectorTable[]; + extern TRKState gTRKState; + extern TRKBuffer gTRKMsgBufs[3]; + //////////////////////////////////// + + ////////// USEFUL STATICS ////////// + static inline DSError TRKAppendBuffer1_ui8(TRKBuffer* buffer, const u8 data) + { + if (buffer->position >= 0x880) { + return DS_MessageBufferOverflow; + } + + buffer->data[buffer->position++] = data; + buffer->length++; + return DS_NoError; + } + //////////////////////////////////// + + #ifdef __cplusplus + } + #endif + +#endif diff --git a/src/PowerPC_EABI_Support/MetroTRK/trkenum.h b/src/PowerPC_EABI_Support/MetroTRK/trkenum.h new file mode 100644 index 0000000..b674857 --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/trkenum.h @@ -0,0 +1,212 @@ +#ifndef _METROTRK_TRKENUM_H + #define _METROTRK_TRKENUM_H + + #include "types.h" + + #ifdef __cplusplus + extern "C" { + #endif + + //////////// TRK ENUMS ///////////// + // Hardware types. + typedef enum { + HARDWARE_AMC_DDH = 0, + HARDWARE_GDEV = 1, + HARDWARE_BBA = 2, + } HardwareType; + + // DS Error returns. + typedef enum { + DS_NoError = 0x0, + DS_StepError = 0x1, + DS_ParameterError = 0x2, + + DS_EventQueueFull = 0x100, + + DS_NoMessageBufferAvailable = 0x300, + DS_MessageBufferOverflow = 0x301, + DS_MessageBufferReadError = 0x302, + + DS_DispatchError = 0x500, + + DS_InvalidMemory = 0x700, + DS_InvalidRegister = 0x701, + DS_CWDSException = 0x702, + DS_UnsupportedError = 0x703, + DS_InvalidProcessID = 0x704, + DS_InvalidThreadID = 0x705, + DS_OSError = 0x706, + + DS_Error800 = 0x800, + } DSError; + + typedef struct DSCPUType { + u8 cpuMajor; + u8 cpuMinor; + u8 bigEndian; + u8 defaultTypeSize; + u8 fpTypeSize; + u8 extended1TypeSize; + u8 extended2TypeSize; + } DSCPUType; + DSError TRKTargetCPUType(DSCPUType* cpuType); + + // Where to read/write. + typedef enum { + DS_Stdin = 0, + DS_Stdout = 1, + DS_Stderr = 2, + } DSFileHandle; + + // IO returns. + typedef enum { + DS_IONoError = 0, + DS_IOError = 1, + DS_IOEOF = 2, + } DSIOResult; + + // Message command IDs + typedef enum { + DSMSG_Ping = 0x0, + DSMSG_Connect = 0x1, + DSMSG_Disconnect = 0x2, + DSMSG_Reset = 0x3, + DSMSG_Versions = 0x4, + DSMSG_SupportMask = 0x5, + DSMSG_Override = 0x7, + + DSMSG_ReadMemory = 0x10, + DSMSG_WriteMemory = 0x11, + DSMSG_ReadRegisters = 0x12, + DSMSG_WriteRegisters = 0x13, + DSMSG_SetOption = 0x17, + DSMSG_Continue = 0x18, + DSMSG_Step = 0x19, + DSMSG_Stop = 0x1A, + + DSMSG_ReplyACK = 0x80, + + DSMSG_NotifyStopped = 0x90, + DSMSG_NotifyException = 0x91, + + DSMSG_WriteFile = 0xD0, + DSMSG_ReadFile = 0xD1, + DSMSG_OpenFile = 0xD2, + DSMSG_CloseFile = 0xD3, + DSMSG_PositionFile = 0xD4, + + DSMSG_ReplyNAK = 0xFF, + } MessageCommandID; + + // Register commands. + typedef enum { + DSREG_Default = 0, + DSREG_FP = 1, + DSREG_Extended1 = 2, + DSREG_Extended2 = 3, + } DSMessageRegisterOptions; + + // Step commands. + typedef enum { + DSSTEP_IntoCount = 0x0, + DSSTEP_IntoRange = 0x1, + DSSTEP_OverCount = 0x10, + DSSTEP_OverRange = 0x11, + } DSMessageStepOptions; + + typedef enum { + DSREPLY_NoError = 0x0, + DSREPLY_Error = 0x1, + DSREPLY_PacketSizeError = 0x2, + DSREPLY_CWDSError = 0x3, + DSREPLY_EscapeError = 0x4, + DSREPLY_BadFCS = 0x5, + DSREPLY_Overflow = 0x6, + DSREPLY_SequenceMissing = 0x7, + + DSREPLY_UnsupportedCommandError = 0x10, + DSREPLY_ParameterError = 0x11, + DSREPLY_UnsupportedOptionError = 0x12, + DSREPLY_InvalidMemoryRange = 0x13, + DSREPLY_InvalidRegisterRange = 0x14, + DSREPLY_CWDSException = 0x15, + DSREPLY_NotStopped = 0x16, + DSREPLY_BreakpointsFull = 0x17, + DSREPLY_BreakpointConflict = 0x18, + + DSREPLY_OSError = 0x20, + DSREPLY_InvalidProcessID = 0x21, + DSREPLY_InvalidThreadID = 0x22, + DSREPLY_DebugSecurityError = 0x23, + } DSReplyError; + + typedef enum { + DSRECV_Wait = 0, + DSRECV_Found = 1, + DSRECV_InFrame = 2, + DSRECV_FrameOverflow = 3, + } ReceiverState; + + typedef enum { + DSMSGMEMORY_Segmented = 0x01, /* non-flat addr space */ + DSMSGMEMORY_Extended = 0x02, /* > 32-bit data addr */ + DSMSGMEMORY_Protected = 0x04, /* non-user memory */ + DSMSGMEMORY_Userview = 0x08, /* breakpoints are invisible */ + DSMSGMEMORY_Space_program = 0x00, + DSMSGMEMORY_Space_data = 0x40, + DSMSGMEMORY_Space_io = 0x80 + }; + + typedef enum { + NUBEVENT_Null = 0, + NUBEVENT_Shutdown = 1, + NUBEVENT_Request = 2, + NUBEVENT_Breakpoint = 3, + NUBEVENT_Exception = 4, + NUBEVENT_Support = 5, + } NubEventType; + + typedef enum { + VALIDMEM_Readable = 0, + VALIDMEM_Writeable = 1, + } ValidMemoryOptions; + + typedef enum { + MEMACCESS_UserMemory = 0, + MEMACCESS_DebuggerMemory = 1, + } MemoryAccessOptions; + + typedef enum { + UART_NoError = 0, + UART_UnknownBaudRate = 1, + UART_ConfigurationError = 2, + UART_BufferOverflow = 3, // specified buffer was too small + UART_NoData = 4, // no data available from polling + } UARTErrorOptions; + + typedef enum { + kBaudHWSet = -1, // use HW settings such as DIP switches + kBaud300 = 300, // valid baud rates + kBaud600 = 600, + kBaud1200 = 1200, + kBaud1800 = 1800, + kBaud2000 = 2000, + kBaud2400 = 2400, + kBaud3600 = 3600, + kBaud4800 = 4800, + kBaud7200 = 7200, + kBaud9600 = 9600, + kBaud19200 = 19200, + kBaud38400 = 38400, + kBaud57600 = 57600, + kBaud115200 = 115200, + kBaud230400 = 230400 + } UARTBaudRate; + + //////////////////////////////////// + + #ifdef __cplusplus + } + #endif + +#endif diff --git a/src/PowerPC_EABI_Support/MetroTRK/trktypes.h b/src/PowerPC_EABI_Support/MetroTRK/trktypes.h new file mode 100644 index 0000000..4c9dc4b --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/trktypes.h @@ -0,0 +1,144 @@ +#ifndef _METROTRK_TRKTYPES_H + #define _METROTRK_TRKTYPES_H + + #include "Revolution/OS/OSInterrupt.h" // IWYU pragma: export + #include "PowerPC_EABI_Support/MetroTRK/trkenum.h" + #include "types.h" + + #ifdef __cplusplus + extern "C" { + #endif + + /////// TRK STRUCTS AND TYPES ////// + // Function types for DB communications. + typedef int (*DBCommFunc)(); + typedef void (*DBCommInitFunc)(volatile u8**, OSInterruptHandler); + typedef int (*DBCommReadFunc)(void*, u32); + typedef int (*DBCommWriteFunc)(const void*, u32); + + // Message buffer ID type. + typedef int TRKBufferID; + + // Nub event ID type. + typedef u32 NubEventID; + + // UART Error type. + typedef int UARTError; + + // Size of message buffer. + #define TRKMSGBUF_SIZE (0x800 + 0x80) + + // Struct for sending and receiving messages (size 0x88C). + typedef struct TRKBuffer { + u32 mutex; // _00 + BOOL isInUse; // _04 + u32 length; // _08 + u32 position; // _0C + u8 data[TRKMSGBUF_SIZE]; // _10 + } TRKBuffer; + + // Struct for storing DB communication functions (size 0x1C). + typedef struct DBCommTable { + DBCommInitFunc initialize_func; // _00 + DBCommFunc init_interrupts_func; // _04 + DBCommFunc peek_func; // _08 + DBCommReadFunc read_func; // _0C + DBCommWriteFunc write_func; // _10 + DBCommFunc open_func; // _14 + DBCommFunc close_func; // _18 + } DBCommTable; + + // Struct for information on DS versions (kernel and protocol) (size 0x4) + typedef struct DSVersions { + u8 kernelMajor; // _00 + u8 kernelMinor; // _01 + u8 protocolMajor; // _02 + u8 protocolMinor; // _03 + } DSVersions; + + // Struct for packet information (size 0x8). + typedef struct TRKPacketSeq { + u16 _00; // _00, unknown + u8 _02[6]; // _02, unknown + } TRKPacketSeq; + + // Struct for receiving packets from serial poll (size 0x14). + typedef struct TRKFramingState { + TRKBufferID msgBufID; // _00 + TRKBuffer* buffer; // _04 + u8 receiveState; // _08 + BOOL isEscape; // _0C + u8 fcsType; // _10 + } TRKFramingState; + + // Command reply information (size 0x40). + typedef struct CommandReply { + u32 _00; // _00 + union { + u8 b; + MessageCommandID m; + } commandID; // _04, use MessageCommandID enum + union { + u8 b; + DSReplyError r; + } replyError; // _08, use DSReplyError enum - should be enum type? check size. + u32 _0C; // _0C + u8 _10[0x30]; // _10, unknown + } CommandReply; + + // Nub event information (size 0xC). + typedef struct TRKEvent { + u8 eventType; // _00 + NubEventID eventID; // _04 + TRKBufferID msgBufID; // _08 + } TRKEvent; + + // Event queue (size 0x28). + typedef struct TRKEventQueue { + u8 _00[4]; // _00, unknown + int count; // _04, number of events in queue + int next; // _08, next event in `events` to handle (0 or 1) + TRKEvent events[2]; // _0C + NubEventID eventID; // _24, ID to assign next event, min 0x100 + } TRKEventQueue; + + // Struct for state information (size 0xB0). + typedef struct TRKState { + u32 gpr[32]; // _00 + u32 lr; // _80 + u32 ctr; // _84 + u32 xer; // _88 + u32 msr; // _8C + u32 dar; // _90 + u32 dsisr; // _94 + BOOL isStopped; // _98 + BOOL inputActivated; // _9C + void* inputPendingPtr; // _A0 + } TRKState; + + typedef struct TRKState_PPC { + u32 GPR[32]; // 0x0 + u32 LR; // 0x80 + u32 CTR; // 0x84 + u32 XER; // 0x88 + u32 MSR; // 0x8c + u32 DAR; // 0x90 + u32 DSISR; // 0x94 + BOOL stopped; // 0x98 + BOOL inputActivated; // 0x9c + u8* inputPendingPtr; // 0xA0 + } TRKState_PPC; + + typedef struct ProcessorRestoreFlags_PPC { + u8 TBR; + u8 DEC; + u8 linker_padding[0x9 - 0x2]; + } ProcessorRestoreFlags_PPC; + + //////////////////////////////////// + + #ifdef __cplusplus + } + #endif + +#endif From 96e918880d2d8b4ecdf0123e092e4d4b9d82bcef Mon Sep 17 00:00:00 2001 From: DeathHound Date: Tue, 21 Apr 2026 19:16:01 +0100 Subject: [PATCH 02/15] Match + Link mainloop.c --- config/SALP4Q/splits.txt | 3 +++ configure.py | 1 + src/PowerPC_EABI_Support/MetroTRK/trktypes.h | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/SALP4Q/splits.txt b/config/SALP4Q/splits.txt index 02be3cc..94b4549 100644 --- a/config/SALP4Q/splits.txt +++ b/config/SALP4Q/splits.txt @@ -138,6 +138,9 @@ PowerPC_EABI_Support/MetroTRK/main_TRK.c: .text start:0x803AADE0 end:0x803AAE1C .sbss start:0x805F5E98 end:0x805F5E9C +PowerPC_EABI_Support/MetroTRK/mainloop.c: + .text start:0x803AAE1C end:0x803AAF08 + Revolution/FS/fs.c: .text start:0x803B17D0 end:0x803B2BB4 .data start:0x8052D858 end:0x8052D87C diff --git a/configure.py b/configure.py index ad8052d..2f6aebb 100644 --- a/configure.py +++ b/configure.py @@ -341,6 +341,7 @@ def MatchingFor(*versions): "progress_category": "sdk", "objects": [ Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/main_TRK.c"), + Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/mainloop.c"), ] }, { diff --git a/src/PowerPC_EABI_Support/MetroTRK/trktypes.h b/src/PowerPC_EABI_Support/MetroTRK/trktypes.h index 4c9dc4b..61f53a4 100644 --- a/src/PowerPC_EABI_Support/MetroTRK/trktypes.h +++ b/src/PowerPC_EABI_Support/MetroTRK/trktypes.h @@ -88,7 +88,7 @@ // Nub event information (size 0xC). typedef struct TRKEvent { - u8 eventType; // _00 + s32 eventType; // _00 NubEventID eventID; // _04 TRKBufferID msgBufID; // _08 } TRKEvent; From 240a45e05945346634d3da82acc1525ef38cdb20 Mon Sep 17 00:00:00 2001 From: DeathHound Date: Wed, 22 Apr 2026 17:02:07 +0100 Subject: [PATCH 03/15] Partial match dolphin_trk.c --- config/SALP4Q/splits.txt | 5 + config/SALP4Q/symbols.txt | 16 +- configure.py | 1 + .../MetroTRK/dolphin_trk.c | 153 ++++++++++++++++++ 4 files changed, 167 insertions(+), 8 deletions(-) create mode 100644 src/PowerPC_EABI_Support/MetroTRK/dolphin_trk.c diff --git a/config/SALP4Q/splits.txt b/config/SALP4Q/splits.txt index 94b4549..127ccfd 100644 --- a/config/SALP4Q/splits.txt +++ b/config/SALP4Q/splits.txt @@ -141,6 +141,11 @@ PowerPC_EABI_Support/MetroTRK/main_TRK.c: PowerPC_EABI_Support/MetroTRK/mainloop.c: .text start:0x803AAE1C end:0x803AAF08 +PowerPC_EABI_Support/MetroTRK/dolphin_trk.c: + .text start:0x803AB28C end:0x803AB5A0 + .data start:0x8052D5E0 end:0x8052D61C + .sbss start:0x805F5EA0 end:0x805F5EA8 + Revolution/FS/fs.c: .text start:0x803B17D0 end:0x803B2BB4 .data start:0x8052D858 end:0x8052D87C diff --git a/config/SALP4Q/symbols.txt b/config/SALP4Q/symbols.txt index 6f8352e..e6415b6 100644 --- a/config/SALP4Q/symbols.txt +++ b/config/SALP4Q/symbols.txt @@ -37558,17 +37558,17 @@ fn_803AAB6C = .text:0x803AAB6C; // type:function size:0x8 fn_803AAB74 = .text:0x803AAB74; // type:function size:0x24 fn_803AAB98 = .text:0x803AAB98; // type:function size:0x108 fn_803AACA0 = .text:0x803AACA0; // type:function size:0x108 -fn_803AADA8 = .text:0x803AADA8; // type:function size:0x38 +TRK_flush_cache = .text:0x803AADA8; // type:function size:0x38 TRK_main = .text:0x803AADE0; // type:function size:0x3C scope:global TRKNubMainLoop = .text:0x803AAE1C; // type:function size:0xEC scope:global -fn_803AAF08 = .text:0x803AAF08; // type:function size:0x13C +TRK_memcpy = .text:0x803AAF08; // type:function size:0x13C fn_803AB044 = .text:0x803AB044; // type:function size:0x128 TRKDispatchMessage = .text:0x803AB16C; // type:function size:0x120 scope:global InitMetroTRK = .text:0x803AB28C; // type:function size:0x94 scope:global InitMetroTRK_BBA = .text:0x803AB324; // type:function size:0x94 scope:global EnableMetroTRKInterrupts = .text:0x803AB3B8; // type:function size:0x4 scope:global -fn_803AB3BC = .text:0x803AB3BC; // type:function size:0x68 -fn_803AB424 = .text:0x803AB424; // type:function size:0x134 +TRKTargetTranslate = .text:0x803AB3BC; // type:function size:0x68 +__TRK_copy_vectors = .text:0x803AB424; // type:function size:0x134 TRKInitializeTarget = .text:0x803AB558; // type:function size:0x48 scope:global fn_803AB5A0 = .text:0x803AB5A0; // type:function size:0x10 TRKLoadContext = .text:0x803AB5B0; // type:function size:0x88 scope:global @@ -37576,7 +37576,7 @@ TRKEXICallBack = .text:0x803AB638; // type:function size:0x38 scope:global InitMetroTRKCommTable = .text:0x803AB670; // type:function size:0x138 scope:global TRKUARTInterruptHandler = .text:0x803AB7A8; // type:function size:0x4 scope:global TRKInitializeIntDrivenUART = .text:0x803AB7AC; // type:function size:0x54 scope:global -fn_803AB800 = .text:0x803AB800; // type:function size:0x2C +EnableEXI2Interrupts = .text:0x803AB800; // type:function size:0x2C fn_803AB82C = .text:0x803AB82C; // type:function size:0x14 fn_803AB840 = .text:0x803AB840; // type:function size:0x3C fn_803AB87C = .text:0x803AB87C; // type:function size:0x3C @@ -37646,7 +37646,7 @@ fn_803AE11C = .text:0x803AE11C; // type:function size:0x70 fn_803AE18C = .text:0x803AE18C; // type:function size:0xC8 fn_803AE254 = .text:0x803AE254; // type:function size:0xB8 fn_803AE30C = .text:0x803AE30C; // type:function size:0xAC -fn_803AE3B8 = .text:0x803AE3B8; // type:function size:0x8 +__TRK_get_MSR = .text:0x803AE3B8; // type:function size:0x8 fn_803AE3C0 = .text:0x803AE3C0; // type:function size:0x8 fn_803AE3C8 = .text:0x803AE3C8; // type:function size:0xF8 fn_803AE4C0 = .text:0x803AE4C0; // type:function size:0xCC @@ -46302,7 +46302,7 @@ Type = .data:0x8052D4C8; // type:object size:0x10 scope:local data:4byte XYNTSC = .data:0x8052D4D8; // type:object size:0x30 scope:local data:byte lbl_8052D508 = .data:0x8052D508; // type:object size:0x68 jumptable_8052D570 = .data:0x8052D570; // type:object size:0x6C scope:local -lbl_8052D5E0 = .data:0x8052D5E0; // type:object size:0x40 data:4byte +TRK_ISR_OFFSETS = .data:0x8052D5E0; // type:object size:0x3C scope:local data:4byte @stringBase0 = .data:0x8052D620; // type:object size:0xE1 scope:local data:string_table lbl_8052D708 = .data:0x8052D708; // type:object size:0x1D data:string @stringBase0 = .data:0x8052D728; // type:object size:0x1D scope:local data:string_table @@ -51265,7 +51265,7 @@ lbl_805F5E84 = .sbss:0x805F5E84; // type:object size:0x4 data:4byte SamplingRate = .sbss:0x805F5E88; // type:object size:0x4 scope:local data:4byte lbl_805F5E90 = .sbss:0x805F5E90; // type:object size:0x8 data:4byte TRK_mainError = .sbss:0x805F5E98; // type:object size:0x4 scope:local data:4byte -lbl_805F5EA0 = .sbss:0x805F5EA0; // type:object size:0x8 data:4byte +lc_base = .sbss:0x805F5EA0; // type:object size:0x8 scope:local data:4byte TRK_Use_BBA = .sbss:0x805F5EA8; // type:object size:0x1 scope:global data:byte lbl_805F5EB0 = .sbss:0x805F5EB0; // type:object size:0x8 data:4byte gTRKInputPendingPtr = .sbss:0x805F5EB8; // type:object size:0x4 scope:global data:4byte diff --git a/configure.py b/configure.py index 2f6aebb..1979f0f 100644 --- a/configure.py +++ b/configure.py @@ -340,6 +340,7 @@ def MatchingFor(*versions): "host": False, "progress_category": "sdk", "objects": [ + Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/dolphin_trk.c"), Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/main_TRK.c"), Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/mainloop.c"), ] diff --git a/src/PowerPC_EABI_Support/MetroTRK/dolphin_trk.c b/src/PowerPC_EABI_Support/MetroTRK/dolphin_trk.c new file mode 100644 index 0000000..3b05ac3 --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/dolphin_trk.c @@ -0,0 +1,153 @@ +#include "PowerPC_EABI_Support/MetroTRK/trk.h" +#include "compiler_macros.h" + +#define EXCEPTIONMASK_ADDR 0x80000044 + +static u32 lc_base; +extern u32 _db_stack_addr; + +static u32 TRK_ISR_OFFSETS[15] = { PPC_SystemReset, + PPC_MachineCheck, + PPC_DataStorage, + PPC_InstructionStorage, + PPC_ExternalInterrupt, + PPC_Alignment, + PPC_Program, + PPC_FloatingPointUnavaiable, + PPC_Decrementer, + PPC_SystemCall, + PPC_Trace, + PPC_PerformanceMonitor, + PPC_InstructionAddressBreakpoint, + PPC_SystemManagementInterrupt, + PPC_ThermalManagementInterrupt }; + +DECL_SECTION(".init") void __TRK_reset() +{ + __TRK_copy_vectors(); +} + +/** + * @TODO: Documentation + */ +asm void InitMetroTRK() +{ +#ifdef __MWERKS__ // clang-format off + nofralloc + + addi r1, r1, -4 + stw r3, 0(r1) + lis r3, gTRKCPUState@h + ori r3, r3, gTRKCPUState@l + stmw r0, ProcessorState_PPC.Default.GPR(r3) //Save the gprs + lwz r4, 0(r1) + addi r1, r1, 4 + stw r1, ProcessorState_PPC.Default.GPR[1](r3) + stw r4, ProcessorState_PPC.Default.GPR[3](r3) + mflr r4 + stw r4, ProcessorState_PPC.Default.LR(r3) + stw r4, ProcessorState_PPC.Default.PC(r3) + mfcr r4 + stw r4, ProcessorState_PPC.Default.CR(r3) + //??? + mfmsr r4 + ori r3, r4, (1 << (31 - 16)) + xori r3, r3, (1 << (31 - 16)) + mtmsr r3 + mtsrr1 r4 //Copy msr to srr1 + //Save misc registers to gTRKCPUState + bl TRKSaveExtended1Block + lis r3, gTRKCPUState@h + ori r3, r3, gTRKCPUState@l + lmw r0, ProcessorState_PPC.Default.GPR(r3) //Restore the gprs + //Reset IABR and DABR + li r0, 0 + mtspr 0x3f2, r0 + mtspr 0x3f5, r0 + //Restore stack pointer + lis r1, _db_stack_addr@h + ori r1, r1, _db_stack_addr@l + mr r3, r5 + bl InitMetroTRKCommTable //Initialize comm table + /* + If InitMetroTRKCommTable returned 1 (failure), an invalid hardware + id or the id for GDEV was somehow passed. Since only BBA or NDEV + are supported, we return early. Otherwise, we proceed with + starting up TRK. + */ + cmpwi r3, 1 + bne initCommTableSuccess + /* + BUG: The code probably orginally reloaded gTRKCPUState here, but + as is it will read the returned value of InitMetroTRKCommTable + as a TRKCPUState struct pointer, causing the CPU to return to + a garbage code address. + */ + lwz r4, ProcessorState_PPC.Default.LR(r3) + mtlr r4 + lmw r0, ProcessorState_PPC.Default.GPR(r3) //Restore the gprs + blr +initCommTableSuccess: + b TRK_main //Jump to TRK_main +#endif // clang-format on +} + +/** + * @TODO: Documentation + */ +void EnableMetroTRKInterrupts(void) +{ + EnableEXI2Interrupts(); +} + +/** + * @TODO: Documentation + */ +u32 TRKTargetTranslate(u32 param_0) +{ + if (param_0 >= lc_base) { + if ((param_0 < lc_base + 0x4000) && ((gTRKCPUState.Extended1.DBAT3U_ & 3) != 0)) { + return param_0; + } + } + + return param_0 & 0x3FFFFFFF | 0x90000000; +} + +/** + * @TODO: Documentation + */ +void TRK_copy_vector(u32 offset) +{ + void* destPtr = (void*)TRKTargetTranslate(offset); + TRK_memcpy(destPtr, gTRKInterruptVectorTable + offset, 0x100); + TRK_flush_cache(destPtr, 0x100); +} + +/** + * @TODO: Documentation + */ +void __TRK_copy_vectors(void) +{ + int i; + u32 mask; + + mask = *(u32*)TRKTargetTranslate(0x44); + + for (i = 0; i <= 14; ++i) { + if (mask & (1 << i)) { + TRK_copy_vector(TRK_ISR_OFFSETS[i]); + } + } +} + +/** + * @TODO: Documentation + */ +DSError TRKInitializeTarget() +{ + gTRKState.isStopped = TRUE; + gTRKState.msr = __TRK_get_MSR(); + lc_base = 0xE0000000; + return DS_NoError; +} From 86b4cae741db40909219f9fa46942c2932eaf4b2 Mon Sep 17 00:00:00 2001 From: DeathHound Date: Wed, 22 Apr 2026 19:48:06 +0100 Subject: [PATCH 04/15] Match targimpl.c --- config/SALP4Q/splits.txt | 7 + config/SALP4Q/symbols.txt | 40 +- configure.py | 1 + src/PowerPC_EABI_Support/MetroTRK/dstypes.h | 16 + src/PowerPC_EABI_Support/MetroTRK/targimpl.c | 381 +++++++++++++++++++ 5 files changed, 425 insertions(+), 20 deletions(-) create mode 100644 src/PowerPC_EABI_Support/MetroTRK/dstypes.h create mode 100644 src/PowerPC_EABI_Support/MetroTRK/targimpl.c diff --git a/config/SALP4Q/splits.txt b/config/SALP4Q/splits.txt index 127ccfd..c8dc6fb 100644 --- a/config/SALP4Q/splits.txt +++ b/config/SALP4Q/splits.txt @@ -146,6 +146,13 @@ PowerPC_EABI_Support/MetroTRK/dolphin_trk.c: .data start:0x8052D5E0 end:0x8052D61C .sbss start:0x805F5EA0 end:0x805F5EA8 +PowerPC_EABI_Support/MetroTRK/targimpl.c: + .text start:0x803AE3B8 end:0x803AEBE4 + .rodata start:0x804E40D8 end:0x804E40E8 + .data start:0x8052D848 end:0x8052D858 + .bss start:0x805A4218 end:0x805A47C0 + .sbss start:0x805F5ED0 end:0x805F5ED4 + Revolution/FS/fs.c: .text start:0x803B17D0 end:0x803B2BB4 .data start:0x8052D858 end:0x8052D87C diff --git a/config/SALP4Q/symbols.txt b/config/SALP4Q/symbols.txt index e6415b6..072a1dc 100644 --- a/config/SALP4Q/symbols.txt +++ b/config/SALP4Q/symbols.txt @@ -37618,12 +37618,12 @@ fn_803AC940 = .text:0x803AC940; // type:function size:0x30 fn_803AC970 = .text:0x803AC970; // type:function size:0xA4 fn_803ACA14 = .text:0x803ACA14; // type:function size:0x90 fn_803ACAA4 = .text:0x803ACAA4; // type:function size:0xD0 -fn_803ACB74 = .text:0x803ACB74; // type:function size:0xF4 +TRKAppendBuffer1_ui64 = .text:0x803ACB74; // type:function size:0xF4 fn_803ACC68 = .text:0x803ACC68; // type:function size:0x64 -fn_803ACCCC = .text:0x803ACCCC; // type:function size:0xF0 -fn_803ACDBC = .text:0x803ACDBC; // type:function size:0xE0 +TRKAppendBuffer_ui32 = .text:0x803ACCCC; // type:function size:0xF0 +TRKReadBuffer1_ui64 = .text:0x803ACDBC; // type:function size:0xE0 fn_803ACE9C = .text:0x803ACE9C; // type:function size:0x98 -fn_803ACF34 = .text:0x803ACF34; // type:function size:0xE8 +TRKReadBuffer_ui32 = .text:0x803ACF34; // type:function size:0xE8 fn_803AD01C = .text:0x803AD01C; // type:function size:0x8 fn_803AD024 = .text:0x803AD024; // type:function size:0x70 fn_803AD094 = .text:0x803AD094; // type:function size:0x88 @@ -37647,14 +37647,14 @@ fn_803AE18C = .text:0x803AE18C; // type:function size:0xC8 fn_803AE254 = .text:0x803AE254; // type:function size:0xB8 fn_803AE30C = .text:0x803AE30C; // type:function size:0xAC __TRK_get_MSR = .text:0x803AE3B8; // type:function size:0x8 -fn_803AE3C0 = .text:0x803AE3C0; // type:function size:0x8 -fn_803AE3C8 = .text:0x803AE3C8; // type:function size:0xF8 -fn_803AE4C0 = .text:0x803AE4C0; // type:function size:0xCC -fn_803AE58C = .text:0x803AE58C; // type:function size:0x150 -fn_803AE6DC = .text:0x803AE6DC; // type:function size:0xF8 -fn_803AE7D4 = .text:0x803AE7D4; // type:function size:0x13C -fn_803AE910 = .text:0x803AE910; // type:function size:0x164 -fn_803AEA74 = .text:0x803AEA74; // type:function size:0x170 +__TRK_set_MSR = .text:0x803AE3C0; // type:function size:0x8 +TRKValidMemory32 = .text:0x803AE3C8; // type:function size:0xF8 +TRK_ppc_memcpy = .text:0x803AE4C0; // type:function size:0xCC +TRKTargetAccessMemory = .text:0x803AE58C; // type:function size:0x150 +TRKTargetAccessDefault = .text:0x803AE6DC; // type:function size:0xF8 +TRKTargetAccessFP = .text:0x803AE7D4; // type:function size:0x13C +TRKTargetAccessExtended1 = .text:0x803AE910; // type:function size:0x164 +TRKTargetAccessExtended2 = .text:0x803AEA74; // type:function size:0x170 TRKInterruptHandler = .text:0x803AEBE4; // type:function size:0x194 scope:global TRKExceptionHandler = .text:0x803AED78; // type:function size:0x9C scope:global TRKPostInterruptEvent = .text:0x803AEE14; // type:function size:0xB8 scope:global @@ -37671,11 +37671,11 @@ TRKTargetSupportRequest = .text:0x803AF50C; // type:function size:0x1F4 scope:gl TRKTargetStopped = .text:0x803AF700; // type:function size:0x10 scope:global TRKTargetSetStopped = .text:0x803AF710; // type:function size:0x10 scope:global fn_803AF720 = .text:0x803AF720; // type:function size:0x18 -fn_803AF738 = .text:0x803AF738; // type:function size:0xDC -fn_803AF814 = .text:0x803AF814; // type:function size:0xA8 +TRKPPCAccessSPR = .text:0x803AF738; // type:function size:0xDC +TRKPPCAccessPairedSingleRegister = .text:0x803AF814; // type:function size:0xA8 fn_803AF8BC = .text:0x803AF8BC; // type:function size:0x24 fn_803AF8E0 = .text:0x803AF8E0; // type:function size:0x24 -fn_803AF904 = .text:0x803AF904; // type:function size:0x1C8 +TRKPPCAccessFPRegister = .text:0x803AF904; // type:function size:0x1C8 fn_803AFACC = .text:0x803AFACC; // type:function size:0x68 TRKTargetSetInputPendingPtr = .text:0x803AFB34; // type:function size:0x10 scope:global fn_803AFB44 = .text:0x803AFB44; // type:function size:0x8 @@ -43633,7 +43633,7 @@ lbl_804E3F88 = .rodata:0x804E3F88; // type:object size:0x10 lbl_804E3F98 = .rodata:0x804E3F98; // type:object size:0x40 align:8 data:double lbl_804E3FD8 = .rodata:0x804E3FD8; // type:object size:0x68 align:8 data:double lbl_804E4040 = .rodata:0x804E4040; // type:object size:0x98 -lbl_804E40D8 = .rodata:0x804E40D8; // type:object size:0x10 data:4byte +gTRKMemMap = .rodata:0x804E40D8; // type:object size:0x10 data:4byte lbl_804E40E8 = .rodata:0x804E40E8; // type:object size:0x28 data:4byte lbl_804E4110 = .rodata:0x804E4110; // type:object size:0x28 data:4byte lbl_804E4138 = .rodata:0x804E4138; // type:object size:0x28 data:4byte @@ -46312,7 +46312,7 @@ lbl_8052D7B8 = .data:0x8052D7B8; // type:object size:0x28 data:string jumptable_8052D7E0 = .data:0x8052D7E0; // type:object size:0x1C scope:local jumptable_8052D7FC = .data:0x8052D7FC; // type:object size:0x1C scope:local lbl_8052D818 = .data:0x8052D818; // type:object size:0x30 -gTRKExceptionStatus = .data:0x8052D848; // type:object size:0x10 scope:local data:4byte +gTRKExceptionStatus = .data:0x8052D848; // type:object size:0x10 scope:global data:4byte @1687 = .data:0x8052D858; // type:object size:0x21 scope:local data:string @2779 = .data:0x8052D880; // type:object size:0x47 scope:local data:string s_currentDir = .data:0x8052D8E0; // type:object size:0x40 scope:local @@ -48256,9 +48256,9 @@ gDBCommTable = .bss:0x805A2820; // type:object size:0x28 scope:global data:4byte lbl_805A2848 = .bss:0x805A2848; // type:object size:0x28 data:4byte lbl_805A2870 = .bss:0x805A2870; // type:object size:0x19A8 data:4byte gTRKRestoreFlags = .bss:0x805A4218; // type:object size:0x9 scope:global data:byte -lbl_805A4228 = .bss:0x805A4228; // type:object size:0x18 data:4byte +gTRKStepStatus = .bss:0x805A4228; // type:object size:0x14 scope:global data:4byte gTRKSaveState = .bss:0x805A4240; // type:object size:0x94 scope:global data:4byte -lbl_805A42D8 = .bss:0x805A42D8; // type:object size:0x10 +TRKvalue128_temp = .bss:0x805A42D8; // type:object size:0x10 gTRKState = .bss:0x805A42E8; // type:object size:0xA4 scope:global data:4byte gTRKCPUState = .bss:0x805A4390; // type:object size:0x430 scope:global data:4byte lbl_805A47C0 = .bss:0x805A47C0; // type:object size:0x10 @@ -51272,7 +51272,7 @@ gTRKInputPendingPtr = .sbss:0x805F5EB8; // type:object size:0x4 scope:global dat lbl_805F5EC0 = .sbss:0x805F5EC0; // type:object size:0x8 data:2byte lbl_805F5EC8 = .sbss:0x805F5EC8; // type:object size:0x4 data:4byte lbl_805F5ECC = .sbss:0x805F5ECC; // type:object size:0x4 data:4byte -TRK_saved_exceptionID = .sbss:0x805F5ED0; // type:object size:0x2 scope:local data:2byte +TRK_saved_exceptionID = .sbss:0x805F5ED0; // type:object size:0x2 scope:global data:2byte lbl_805F5ED8 = .sbss:0x805F5ED8; // type:object size:0x8 data:byte lbl_805F5EE0 = .sbss:0x805F5EE0; // type:object size:0x4 data:4byte lbl_805F5EE4 = .sbss:0x805F5EE4; // type:object size:0x4 data:4byte diff --git a/configure.py b/configure.py index 1979f0f..0ef341d 100644 --- a/configure.py +++ b/configure.py @@ -343,6 +343,7 @@ def MatchingFor(*versions): Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/dolphin_trk.c"), Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/main_TRK.c"), Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/mainloop.c"), + Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/targimpl.c"), ] }, { diff --git a/src/PowerPC_EABI_Support/MetroTRK/dstypes.h b/src/PowerPC_EABI_Support/MetroTRK/dstypes.h new file mode 100644 index 0000000..09d99f6 --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/dstypes.h @@ -0,0 +1,16 @@ +#ifndef METROTRK_DSTYPES + #define METROTRK_DSTYPES + + #include "types.h" // IWYU pragma: keep + + #ifdef __cplusplus + extern "C" { + #endif + + typedef unsigned char u128[16]; + + #ifdef __cplusplus + } + #endif + +#endif diff --git a/src/PowerPC_EABI_Support/MetroTRK/targimpl.c b/src/PowerPC_EABI_Support/MetroTRK/targimpl.c new file mode 100644 index 0000000..9d2725e --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/targimpl.c @@ -0,0 +1,381 @@ +#include "PowerPC_EABI_Support/MetroTRK/dstypes.h" +#include "PowerPC_EABI_Support/MetroTRK/trk.h" +#include "PowerPC_EABI_Support/MSL/MSL_C/stddef.h" // IWYU pragma: keep + +typedef struct memRange { + u8* start; + u8* end; + BOOL readable; + BOOL writeable; +} memRange; + +const memRange gTRKMemMap[1] = { { (u8*)0, (u8*)-1, TRUE, TRUE } }; + +typedef struct StopInfo_PPC { + u32 PC; + u32 PCInstruction; + u16 exceptionID; +} StopInfo_PPC; +typedef struct TRKExceptionStatus { + StopInfo_PPC exceptionInfo; + u8 inTRK; + u8 exceptionDetected; +} TRKExceptionStatus; +typedef struct TRKStepStatus { + BOOL active; // 0x0 + u8 type; // 0x4 + u32 count; // 0x8 + u32 rangeStart; // 0xC + u32 rangeEnd; // 0x10 +} TRKStepStatus; + +// Instruction macros +#define INSTR_NOP 0x60000000 +#define INSTR_BLR 0x4E800020 +#define DSFetch_u32(_p_) (*((u32*)_p_)) +#define DSFetch_u64(_p_) (*((u64*)_p_)) +#define INSTR_PSQ_ST(psr, offset, rDest, w, gqr) (0xF0000000 | (psr << 21) | (rDest << 16) | (w << 15) | (gqr << 12) | offset) +#define INSTR_PSQ_L(psr, offset, rSrc, w, gqr) (0xE0000000 | (psr << 21) | (rSrc << 16) | (w << 15) | (gqr << 12) | offset) +#define INSTR_STW(rSrc, offset, rDest) (0x90000000 | (rSrc << 21) | (rDest << 16) | offset) +#define INSTR_LWZ(rDest, offset, rSrc) (0x80000000 | (rDest << 21) | (rSrc << 16) | offset) +#define INSTR_STFD(fprSrc, offset, rDest) (0xD8000000 | (fprSrc << 21) | (rDest << 16) | offset) +#define INSTR_LFD(fprDest, offset, rSrc) (0xC8000000 | (fprDest << 21) | (rSrc << 16) | offset) +#define INSTR_MFSPR(rDest, spr) (0x7C000000 | (rDest << 21) | ((spr & 0xFE0) << 6) | ((spr & 0x1F) << 16) | 0x2A6) +#define INSTR_MTSPR(spr, rSrc) (0x7C000000 | (rSrc << 21) | ((spr & 0xFE0) << 6) | ((spr & 0x1F) << 16) | 0x3A6) + +ProcessorRestoreFlags_PPC gTRKRestoreFlags = { FALSE, FALSE }; +TRKExceptionStatus gTRKExceptionStatus = { { 0, 0, 0 }, TRUE, 0 }; +TRKStepStatus gTRKStepStatus = { FALSE, DSSTEP_IntoCount, 0, 0 }; +u16 TRK_saved_exceptionID = 0; +ProcessorState_PPC gTRKCPUState; +TRKState gTRKState; + +u128 TRKvalue128_temp; + +Default_PPC gTRKSaveState; +void TRKPostInterruptEvent(void); +void TRKExceptionHandler(u16 a); +void TRKUARTInterruptHandler(void); +void TRKInterruptHandlerEnableInterrupts(void); +DSError TRKPPCAccessSPR(void*, u32, BOOL); +DSError TRKPPCAccessPairedSingleRegister(void*, u32, BOOL); +DSError TRKPPCAccessFPRegister(void*, u32, BOOL); +DSError TRKPPCAccessSpecialReg(void*, u32*, BOOL); + +static BOOL TRKTargetCheckStep(); + +asm u32 __TRK_get_MSR() { + #ifdef __MWERKS__ // clang-format off + nofralloc + mfmsr r3 + blr + #endif // clang-format on +} + +asm void __TRK_set_MSR(register u32 msr) +{ + #ifdef __MWERKS__ // clang-format off + nofralloc + mtmsr msr + blr + #endif // clang-format on +} + +DSError TRKValidMemory32(const void* addr, size_t length, ValidMemoryOptions readWriteable) +{ + DSError err = DS_InvalidMemory; /* assume range is invalid */ + const u8* start = (const u8*)addr; + const u8* end = ((const u8*)addr + (length - 1)); + + if (end < start) + return DS_InvalidMemory; + + for (int i = 0; (i < (s32)(sizeof(gTRKMemMap) / sizeof(memRange))); i++) { + if ((start <= (const u8*)gTRKMemMap[i].end) && (end >= (const u8*)gTRKMemMap[i].start)) { + + if (((readWriteable == VALIDMEM_Readable) && !gTRKMemMap[i].readable) + || ((readWriteable == VALIDMEM_Writeable) && !gTRKMemMap[i].writeable)) { + err = DS_InvalidMemory; + } else { + err = DS_NoError; + + if (start < (const u8*)gTRKMemMap[i].start) + err = TRKValidMemory32(start, (u32)((const u8*)gTRKMemMap[i].start - start), readWriteable); + + if ((err == DS_NoError) && (end > (const u8*)gTRKMemMap[i].end)) + err = TRKValidMemory32((const u8*)gTRKMemMap[i].end, (u32)(end - (const u8*)gTRKMemMap[i].end), readWriteable); + } + + break; + } + } + + return err; +} + + +asm void TRK_ppc_memcpy(register void* dest, register const void* src, register int n, register u32 param_4, register u32 param_5) { + #ifdef __MWERKS__ // clang-format off + stwu r1, -0x30(r1) + mflr r0 + stw r0, 0x34(r1) + stmw r24, 0x10(r1) + mr r29, r3 + mr r30, r4 + mr r26, r5 + mr r27, r6 + mr r28, r7 + bl __TRK_get_MSR + mr r31, r3 + li r25, 0xFF + b L2 + L1: + mr r3, r28 + bl __TRK_set_MSR + clrrwi r3, r30, 2 + subf r0, r3, r30 + lwz r3, 0x0(r3) + subfic r0, r0, 0x3 + slwi r0, r0, 3 + srw r0, r3, r0 + clrlwi r24, r0, 24 + sync + mr r3, r27 + bl __TRK_set_MSR + clrrwi r6, r29, 2 + subf r0, r6, r29 + lwz r5, 0x0(r6) + subfic r3, r0, 0x3 + subfic r0, r0, 0x3 + slwi r3, r3, 3 + slwi r0, r0, 3 + slw r4, r25, r3 + slw r0, r24, r0 + andc r3, r5, r4 + and r0, r4, r0 + or r0, r3, r0 + stw r0, 0x0(r6) + sync + addi r30, r30, 0x1 + addi r29, r29, 0x1 + subi r26, r26, 0x1 + L2: + cmpwi r26, 0x0 + bne L1 + mr r3, r31 + bl __TRK_set_MSR + lmw r24, 0x10(r1) + lwz r0, 0x34(r1) + mtlr r0 + addi r1, r1, 0x30 + blr + #endif // clang-format on +} + +DSError TRKTargetAccessMemory(void* data, u32 start, size_t* length, MemoryAccessOptions accessOptions, BOOL read) +{ + DSError error; + u32 target_msr; + void* addr; + u32 trk_msr; + TRKExceptionStatus tempExceptionStatus = gTRKExceptionStatus; + gTRKExceptionStatus.exceptionDetected = FALSE; + + addr = (void*)TRKTargetTranslate(start); + error = TRKValidMemory32(addr, *length, read ? VALIDMEM_Readable : VALIDMEM_Writeable); + + if (error != DS_NoError) { + *length = 0; + } else { + target_msr = __TRK_get_MSR(); + trk_msr = target_msr | gTRKCPUState.Extended1.MSR & 0x10; + + if (read) { + TRK_ppc_memcpy(data, addr, *length, target_msr, trk_msr); + } else { + TRK_ppc_memcpy(addr, data, *length, trk_msr, target_msr); + TRK_flush_cache(addr, *length); + if ((void*)start != addr) { + TRK_flush_cache((void*)start, *length); + } + } + } + + if (gTRKExceptionStatus.exceptionDetected) { + *length = 0; + error = DS_CWDSException; + } + + gTRKExceptionStatus = tempExceptionStatus; + return error; +} + +DSError TRKTargetAccessDefault(u32 firstRegister, u32 lastRegister, TRKBuffer* b, size_t* registersLengthPtr, BOOL read) +{ + DSError error; + u32 count; + u32* data; + TRKExceptionStatus tempExceptionStatus; + + if (lastRegister > 0x24) { + return DS_InvalidRegister; + } + + tempExceptionStatus = gTRKExceptionStatus; + + gTRKExceptionStatus.exceptionDetected = FALSE; + + data = gTRKCPUState.Default.GPR + firstRegister; + + count = (lastRegister - firstRegister) + 1; + + *registersLengthPtr = count * sizeof(u32); + + if (read) { + error = TRKAppendBuffer_ui32(b, data, count); + } else { + error = TRKReadBuffer_ui32(b, data, count); + } + + if (gTRKExceptionStatus.exceptionDetected) { + *registersLengthPtr = 0; + error = DS_CWDSException; + } + + gTRKExceptionStatus = tempExceptionStatus; + return error; +} + +DSError TRKTargetAccessFP(u32 firstRegister, u32 lastRegister, TRKBuffer* b, size_t* registersLengthPtr, BOOL read) +{ + u64 temp; + DSError error; + TRKExceptionStatus tempExceptionStatus; + u32 current; + + if (lastRegister > 0x21) { + return DS_InvalidRegister; + } + + tempExceptionStatus = gTRKExceptionStatus; + gTRKExceptionStatus.exceptionDetected = FALSE; + + __TRK_set_MSR(__TRK_get_MSR() | 0x2000); + + *registersLengthPtr = 0; + error = DS_NoError; + + for (current = firstRegister; (current <= lastRegister) && (error == DS_NoError); current++, *registersLengthPtr += sizeof(f64)) { + if (read) { + TRKPPCAccessFPRegister(&temp, current, read); + error = TRKAppendBuffer1_ui64(b, temp); + } else { + TRKReadBuffer1_ui64(b, &temp); + error = TRKPPCAccessFPRegister(&temp, current, read); + } + } + + if (gTRKExceptionStatus.exceptionDetected) { + *registersLengthPtr = 0; + error = DS_CWDSException; + } + + gTRKExceptionStatus = tempExceptionStatus; + return error; +} + +DSError TRKTargetAccessExtended1(u32 firstRegister, u32 lastRegister, TRKBuffer* b, size_t* registersLengthPtr, BOOL read) +{ + TRKExceptionStatus tempExceptionStatus; + int error; + u32* data; + int count; + + if (lastRegister > 0x60) { + return DS_InvalidRegister; + } + + tempExceptionStatus = gTRKExceptionStatus; + gTRKExceptionStatus.exceptionDetected = FALSE; + + *registersLengthPtr = 0; + + if (firstRegister <= lastRegister) { + data = (u32*)&gTRKCPUState.Extended1 + firstRegister; + count = lastRegister - firstRegister + 1; + *registersLengthPtr += count * sizeof(u32); + + if (read) { + error = TRKAppendBuffer_ui32(b, data, count); + } else { + if (data <= &gTRKCPUState.Extended1.TBU && (data + count - 1) >= &gTRKCPUState.Extended1.TBL) { + gTRKRestoreFlags.TBR = 1; + } + + if (data <= &gTRKCPUState.Extended1.DEC && (data + count - 1) >= &gTRKCPUState.Extended1.DEC) { + gTRKRestoreFlags.DEC = 1; + } + error = TRKReadBuffer_ui32(b, data, count); + } + } + if (gTRKExceptionStatus.exceptionDetected) { + *registersLengthPtr = 0; + error = DS_CWDSException; + } + + gTRKExceptionStatus = tempExceptionStatus; + return error; +} + +DSError TRKTargetAccessExtended2(u32 firstRegister, u32 lastRegister, TRKBuffer* b, size_t* registerStorageSize, BOOL read) +{ + u32 value_buf[2]; + TRKExceptionStatus savedException; + u32 i; + DSError err; + u32 value_buf0[1]; + + if (lastRegister > 0x1f) + return DS_InvalidRegister; + + /* + ** Save any existing exception status and clear the exception flag. + ** This allows detection of exceptions that occur ONLY within this + ** function. + */ + + savedException = gTRKExceptionStatus; + gTRKExceptionStatus.exceptionDetected = FALSE; + + TRKPPCAccessSPR(value_buf0, SPR_HID2, TRUE); + + value_buf0[0] |= 0xA0000000; + TRKPPCAccessSPR(value_buf0, SPR_HID2, FALSE); + + value_buf0[0] = 0; + TRKPPCAccessSPR(value_buf0, SPR_GQR0, FALSE); + + *registerStorageSize = 0; + err = DS_NoError; + + for (i = firstRegister; (i <= lastRegister) && (err == DS_NoError); i++) { + if (read) { + err = TRKPPCAccessPairedSingleRegister((u64*)value_buf, i, read); + err = TRKAppendBuffer1_ui64(b, *(u64*)value_buf); + } else { + err = TRKReadBuffer1_ui64(b, (u64*)value_buf); + err = TRKPPCAccessPairedSingleRegister((u64*)value_buf, i, read); + } + + *registerStorageSize += sizeof(u64); + } + + if (gTRKExceptionStatus.exceptionDetected) { + *registerStorageSize = 0; + err = DS_CWDSException; + } + + gTRKExceptionStatus = savedException; + + return err; +} From 9345c836934a35846e5f2e128dba02ca927c51aa Mon Sep 17 00:00:00 2001 From: DeathHound Date: Wed, 22 Apr 2026 20:10:05 +0100 Subject: [PATCH 05/15] Match + Link flush_cache.c --- config/SALP4Q/splits.txt | 3 +++ configure.py | 1 + .../MetroTRK/flush_cache.c | 27 +++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 src/PowerPC_EABI_Support/MetroTRK/flush_cache.c diff --git a/config/SALP4Q/splits.txt b/config/SALP4Q/splits.txt index c8dc6fb..51a0479 100644 --- a/config/SALP4Q/splits.txt +++ b/config/SALP4Q/splits.txt @@ -134,6 +134,9 @@ PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/secure_error.c: .text start:0x803A34AC end:0x803A34C4 .sbss start:0x805F5E48 end:0x805F5E4C +PowerPC_EABI_Support/MetroTRK/flush_cache.c: + .text start:0x803AADA8 end:0x803AADE0 + PowerPC_EABI_Support/MetroTRK/main_TRK.c: .text start:0x803AADE0 end:0x803AAE1C .sbss start:0x805F5E98 end:0x805F5E9C diff --git a/configure.py b/configure.py index 0ef341d..afa9a2c 100644 --- a/configure.py +++ b/configure.py @@ -341,6 +341,7 @@ def MatchingFor(*versions): "progress_category": "sdk", "objects": [ Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/dolphin_trk.c"), + Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/flush_cache.c"), Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/main_TRK.c"), Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/mainloop.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/targimpl.c"), diff --git a/src/PowerPC_EABI_Support/MetroTRK/flush_cache.c b/src/PowerPC_EABI_Support/MetroTRK/flush_cache.c new file mode 100644 index 0000000..2dbf5df --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/flush_cache.c @@ -0,0 +1,27 @@ +#include "PowerPC_EABI_Support/MetroTRK/trk.h" // IWYU pragma: keep + + +asm void TRK_flush_cache(register void* param_1, register int param_2) +{ +#ifdef __MWERKS__ // clang-format off + nofralloc + + lis r5, 0xFFFF + ori r5, r5, 0xFFF1 + and r5, r5, param_1 + subf r3, r5, param_1 + add r4, param_2, r3 + + loop: + dcbst 0, r5 + dcbf 0, r5 + sync + icbi 0, r5 + addic r5, r5, 8 + addic. r4, r4, -8 + bge loop + + isync + blr + #endif // clang-format on +} From 3078c767e4d6c3949a3503539c00cd0238699196 Mon Sep 17 00:00:00 2001 From: DeathHound Date: Wed, 22 Apr 2026 20:39:14 +0100 Subject: [PATCH 06/15] Partial match mpc_7xx_603e.c --- config/SALP4Q/splits.txt | 3 + configure.py | 1 + .../MetroTRK/mpc_7xx_603e.c | 220 ++++++++++++++++++ 3 files changed, 224 insertions(+) create mode 100644 src/PowerPC_EABI_Support/MetroTRK/mpc_7xx_603e.c diff --git a/config/SALP4Q/splits.txt b/config/SALP4Q/splits.txt index 51a0479..25a1b33 100644 --- a/config/SALP4Q/splits.txt +++ b/config/SALP4Q/splits.txt @@ -149,6 +149,9 @@ PowerPC_EABI_Support/MetroTRK/dolphin_trk.c: .data start:0x8052D5E0 end:0x8052D61C .sbss start:0x805F5EA0 end:0x805F5EA8 +PowerPC_EABI_Support/MetroTRK/mpc_7xx_603e.c: + .text start:0x803AC484 end:0x803AC7AC + PowerPC_EABI_Support/MetroTRK/targimpl.c: .text start:0x803AE3B8 end:0x803AEBE4 .rodata start:0x804E40D8 end:0x804E40E8 diff --git a/configure.py b/configure.py index afa9a2c..f2d3083 100644 --- a/configure.py +++ b/configure.py @@ -344,6 +344,7 @@ def MatchingFor(*versions): Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/flush_cache.c"), Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/main_TRK.c"), Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/mainloop.c"), + Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/mpc_7xx_603e.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/targimpl.c"), ] }, diff --git a/src/PowerPC_EABI_Support/MetroTRK/mpc_7xx_603e.c b/src/PowerPC_EABI_Support/MetroTRK/mpc_7xx_603e.c new file mode 100644 index 0000000..c91f092 --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/mpc_7xx_603e.c @@ -0,0 +1,220 @@ +#include "PowerPC_EABI_Support/MetroTRK/trk.h" // IWYU pragma: keep + +asm void TRKSaveExtended1Block() +{ +#ifdef __MWERKS__ // clang-format off + nofralloc + lis r2, gTRKCPUState@h + ori r2, r2, gTRKCPUState@l + mfsr r16, 0 + mfsr r17, 1 + mfsr r18, 2 + mfsr r19, 3 + mfsr r20, 4 + mfsr r21, 5 + mfsr r22, 6 + mfsr r23, 7 + mfsr r24, 8 + mfsr r25, 9 + mfsr r26, 0xa + mfsr r27, 0xb + mfsr r28, 0xc + mfsr r29, 0xd + mfsr r30, 0xe + mfsr r31, 0xf + stmw r16, 0x1a8(r2) + mftb r27, 0x10c + mftbu r28 + mfspr r29, 0x3f0 + mfspr r30, 0x3f1 + mfspr r31, 0x1b + stmw r27, 0x1e8(r2) + mfpvr r15 + mfibatu r16, 0 + mfibatl r17, 0 + mfibatu r18, 1 + mfibatl r19, 1 + mfibatu r20, 2 + mfibatl r21, 2 + mfibatu r22, 3 + mfibatl r23, 3 + mfdbatu r24, 0 + mfdbatl r25, 0 + mfdbatu r26, 1 + mfdbatl r27, 1 + mfdbatu r28, 2 + mfdbatl r29, 2 + mfdbatu r30, 3 + mfdbatl r31, 3 + stmw r15, 0x1fc(r2) + mfspr r24, 560 + mfspr r25, 561 + mfspr r26, 562 + mfspr r27, 563 + mfspr r28, 564 + mfspr r29, 565 + mfspr r30, 566 + mfspr r31, 567 + stmw r24, 0x240(r2) + mfsdr1 r22 + mfdar r23 + mfdsisr r24 + mfsprg r25, 0 + mfsprg r26, 1 + mfsprg r27, 2 + mfsprg r28, 3 + mfdec r29 + mfspr r30, IABR + mfear r31 + stmw r22, 0x25c(r2) + mfspr r24, DABR + mfspr r25, PMC1 + mfspr r26, PMC2 + mfspr r27, PMC3 + mfspr r28, PMC4 + mfspr r29, SIA + mfspr r30, MMCR0 + mfspr r31, MMCR1 + stmw r24, 0x284(r2) + mfspr r29, 567 + mfspr r30, 568 + mfspr r31, 569 + stmw r29, 0x2a4(r2) + mfspr r30, ICTC + mfspr r31, L2CR + stmw r30, 0x2b0(r2) + mfsrr0 r16 + stw r16, 0x2b8(r2) + mfspr r17, 570 + stw r17, 0x2bc(r2) + mfspr r25, UMMCR0 + mfspr r26, UPMC1 + mfspr r27, UPMC2 + mfspr r28, USIA + mfspr r29, UMMCR1 + mfspr r30, UPMC3 + mfspr r31, UPMC4 + stmw r25, 0x2c0(r2) + mfspr r25, 571 + mfspr r26, 572 + mfspr r27, 573 + mfspr r28, 574 + mfspr r29, 575 + mfspr r30, HID2 + mfspr r31, 1011 + stmw r25, 0x2dc(r2) + mfspr r20, GQR0 + mfspr r21, GQR1 + mfspr r22, GQR2 + mfspr r23, GQR3 + mfspr r24, GQR4 + mfspr r25, GQR5 + mfspr r26, GQR6 + mfspr r27, GQR7 + mfspr r28, HID2 + mfspr r29, WPAR + mfspr r30, DMA_U + mfspr r31, DMA_L + stmw r20, 0x2fc(r2) + blr +#endif // clang-format on +} + +asm void TRKRestoreExtended1Block() +{ +#ifdef __MWERKS__ // clang-format off + nofralloc + lis r2, gTRKCPUState@h /* 0x8044F338@h */ + ori r2, r2, gTRKCPUState@l /* 0x8044F338@l */ + lis r5, gTRKRestoreFlags@h /* 0x803D3238@h */ + ori r5, r5, gTRKRestoreFlags@l /* 0x803D3238@l */ + lbz r3, 0(r5) + lbz r6, 1(r5) + li r0, 0 + stb r0, 0(r5) + stb r0, 1(r5) + cmpwi r3, 0 + beq L1 + lwz r24, 0x1e8(r2) + lwz r25, 0x1ec(r2) + mttbl r24 + mttbu r25 +L1: + lmw r20, 0x2fc(r2) + mtspr 0x390, r20 + mtspr 0x391, r21 + mtspr 0x392, r22 + mtspr 0x393, r23 + mtspr 0x394, r24 + mtspr 0x395, r25 + mtspr 0x396, r26 + mtspr 0x397, r27 + mtspr 0x398, r28 + mtspr 0x39a, r30 + mtspr 0x39b, r31 + b L2 +L2: + lmw r19, 0x284(r2) + mtspr 0x3f5, r19 + mtspr 0x3b9, r20 + mtspr 0x3ba, r21 + mtspr 0x3bd, r22 + mtspr 0x3be, r23 + mtspr 0x3bb, r24 + mtspr 0x3b8, r25 + mtspr 0x3bc, r26 + mtspr 0x3FB, r30 + mtspr 0x3f9, r31 + b L3 +L3: + lmw r16, 0x1a8(r2) + mtsr 0, r16 + mtsr 1, r17 + mtsr 2, r18 + mtsr 3, r19 + mtsr 4, r20 + mtsr 5, r21 + mtsr 6, r22 + mtsr 7, r23 + mtsr 8, r24 + mtsr 9, r25 + mtsr 0xa, r26 + mtsr 0xb, r27 + mtsr 0xc, r28 + mtsr 0xd, r29 + mtsr 0xe, r30 + mtsr 0xf, r31 + lmw r12, 0x1f0(r2) + mtspr 0x3f0, r12 + mtspr 0x3f1, r13 + mtspr 0x1b, r14 + mtspr 0x11f, r15 + mtibatu 0, r16 + mtibatl 0, r17 + mtibatu 1, r18 + mtibatl 1, r19 + mtibatu 2, r20 + mtibatl 2, r21 + mtibatu 3, r22 + mtibatl 3, r23 + mtdbatu 0, r24 + mtdbatl 0, r25 + mtdbatu 1, r26 + mtdbatl 1, r27 + mtdbatu 2, r28 + mtdbatl 2, r29 + mtdbatu 3, r30 + mtdbatl 3, r31 + lmw r22, 0x25c(r2) + mtspr 0x19, r22 + mtdar r23 + mtdsisr r24 + mtspr 0x110, r25 + mtspr 0x111, r26 + mtspr 0x112, r27 + mtspr 0x113, r28 + mtspr 0x3f2, r30 + mtspr 0x11a, r31 + blr +#endif // clang-format on +} From ef31e0fc138c9cb1821ee574e46dc0950f7d1b9a Mon Sep 17 00:00:00 2001 From: DeathHound Date: Thu, 23 Apr 2026 08:53:57 +0100 Subject: [PATCH 07/15] Partial match nubevent.c --- config/SALP4Q/splits.txt | 4 ++ config/SALP4Q/symbols.txt | 8 +-- configure.py | 1 + src/PowerPC_EABI_Support/MetroTRK/nubevent.c | 72 ++++++++++++++++++++ 4 files changed, 81 insertions(+), 4 deletions(-) create mode 100644 src/PowerPC_EABI_Support/MetroTRK/nubevent.c diff --git a/config/SALP4Q/splits.txt b/config/SALP4Q/splits.txt index 25a1b33..c48ebe7 100644 --- a/config/SALP4Q/splits.txt +++ b/config/SALP4Q/splits.txt @@ -149,6 +149,10 @@ PowerPC_EABI_Support/MetroTRK/dolphin_trk.c: .data start:0x8052D5E0 end:0x8052D61C .sbss start:0x805F5EA0 end:0x805F5EA8 +PowerPC_EABI_Support/MetroTRK/nubevent.c: + .text start:0x803AB9DC end:0x803ABB78 + .bss start:0x805A2848 end:0x805A2870 + PowerPC_EABI_Support/MetroTRK/mpc_7xx_603e.c: .text start:0x803AC484 end:0x803AC7AC diff --git a/config/SALP4Q/symbols.txt b/config/SALP4Q/symbols.txt index 072a1dc..c2599e1 100644 --- a/config/SALP4Q/symbols.txt +++ b/config/SALP4Q/symbols.txt @@ -37587,8 +37587,8 @@ InitializeProgramEndTrap = .text:0x803AB8F8; // type:function size:0x54 scope:gl fn_803AB94C = .text:0x803AB94C; // type:function size:0x90 TRKInitializeEventQueue = .text:0x803AB9DC; // type:function size:0x24 scope:global TRKGetNextEvent = .text:0x803ABA00; // type:function size:0x8C scope:global -fn_803ABA8C = .text:0x803ABA8C; // type:function size:0xCC -fn_803ABB58 = .text:0x803ABB58; // type:function size:0x18 +TRKPostEvent = .text:0x803ABA8C; // type:function size:0xCC +TRKConstructEvent = .text:0x803ABB58; // type:function size:0x18 TRKDestructEvent = .text:0x803ABB70; // type:function size:0x8 scope:global TRKInitializeNub = .text:0x803ABB78; // type:function size:0xAC scope:global TRKTerminateNub = .text:0x803ABC24; // type:function size:0x24 scope:global @@ -37612,7 +37612,7 @@ fn_803AC7AC = .text:0x803AC7AC; // type:function size:0x64 TRKInitializeMessageBuffers = .text:0x803AC810; // type:function size:0x20 scope:global fn_803AC830 = .text:0x803AC830; // type:function size:0x9C TRKGetBuffer = .text:0x803AC8CC; // type:function size:0x24 scope:global -fn_803AC8F0 = .text:0x803AC8F0; // type:function size:0x28 +TRKReleaseBuffer = .text:0x803AC8F0; // type:function size:0x28 fn_803AC918 = .text:0x803AC918; // type:function size:0x28 fn_803AC940 = .text:0x803AC940; // type:function size:0x30 fn_803AC970 = .text:0x803AC970; // type:function size:0xA4 @@ -48253,7 +48253,7 @@ lbl_805A21A0 = .bss:0x805A21A0; // type:object size:0x160 lbl_805A2300 = .bss:0x805A2300; // type:object size:0x500 lbl_805A2800 = .bss:0x805A2800; // type:object size:0x20 gDBCommTable = .bss:0x805A2820; // type:object size:0x28 scope:global data:4byte -lbl_805A2848 = .bss:0x805A2848; // type:object size:0x28 data:4byte +gTRKEventQueue = .bss:0x805A2848; // type:object size:0x28 data:4byte lbl_805A2870 = .bss:0x805A2870; // type:object size:0x19A8 data:4byte gTRKRestoreFlags = .bss:0x805A4218; // type:object size:0x9 scope:global data:byte gTRKStepStatus = .bss:0x805A4228; // type:object size:0x14 scope:global data:4byte diff --git a/configure.py b/configure.py index f2d3083..9d4624d 100644 --- a/configure.py +++ b/configure.py @@ -345,6 +345,7 @@ def MatchingFor(*versions): Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/main_TRK.c"), Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/mainloop.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/mpc_7xx_603e.c"), + Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/nubevent.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/targimpl.c"), ] }, diff --git a/src/PowerPC_EABI_Support/MetroTRK/nubevent.c b/src/PowerPC_EABI_Support/MetroTRK/nubevent.c new file mode 100644 index 0000000..17130de --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/nubevent.c @@ -0,0 +1,72 @@ +#include "PowerPC_EABI_Support/MetroTRK/trk.h" + +TRKEventQueue gTRKEventQueue; + +DSError TRKInitializeEventQueue() +{ + TRKInitializeMutex(&gTRKEventQueue); + TRKAcquireMutex(&gTRKEventQueue); + gTRKEventQueue.count = 0; + gTRKEventQueue.next = 0; + gTRKEventQueue.eventID = 0x100; + TRKReleaseMutex(&gTRKEventQueue); + return DS_NoError; +} + +void TRKCopyEvent(TRKEvent* dstEvent, const TRKEvent* srcEvent) +{ + TRK_memcpy(dstEvent, srcEvent, sizeof(TRKEvent)); +} + +BOOL TRKGetNextEvent(TRKEvent* event) +{ + BOOL status = FALSE; + TRKAcquireMutex(&gTRKEventQueue); + if (0 < gTRKEventQueue.count) { + TRKCopyEvent(event, &gTRKEventQueue.events[gTRKEventQueue.next]); + gTRKEventQueue.count--; + gTRKEventQueue.next++; + if (gTRKEventQueue.next == 2) + gTRKEventQueue.next = 0; + + status = TRUE; + } + TRKReleaseMutex(&gTRKEventQueue); + return status; +} + +DSError TRKPostEvent(TRKEvent* event) +{ + DSError ret = DS_NoError; + int nextEventID; + + TRKAcquireMutex(&gTRKEventQueue); + + if (gTRKEventQueue.count == 2) { + ret = DS_EventQueueFull; + } else { + nextEventID = (gTRKEventQueue.next + gTRKEventQueue.count) % 2; + TRKCopyEvent(&gTRKEventQueue.events[nextEventID], event); + gTRKEventQueue.events[nextEventID].eventID = gTRKEventQueue.eventID; + gTRKEventQueue.eventID++; + if (gTRKEventQueue.eventID < 0x100) + gTRKEventQueue.eventID = 0x100; + + gTRKEventQueue.count++; + } + + TRKReleaseMutex(&gTRKEventQueue); + return ret; +} + +void TRKConstructEvent(TRKEvent* event, int eventType) +{ + event->eventType = eventType; + event->eventID = 0; + event->msgBufID = -1; +} + +void TRKDestructEvent(TRKEvent* event) +{ + TRKReleaseBuffer(event->msgBufID); +} From 8b7f631166d992bd5dbe99ab892c59c619be2927 Mon Sep 17 00:00:00 2001 From: DeathHound Date: Thu, 23 Apr 2026 09:46:05 +0100 Subject: [PATCH 08/15] Partial match nubinit.c --- config/SALP4Q/splits.txt | 5 ++ config/SALP4Q/symbols.txt | 6 +- configure.py | 1 + src/PowerPC_EABI_Support/MetroTRK/nubinit.c | 65 +++++++++++++++++++++ 4 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 src/PowerPC_EABI_Support/MetroTRK/nubinit.c diff --git a/config/SALP4Q/splits.txt b/config/SALP4Q/splits.txt index c48ebe7..3550090 100644 --- a/config/SALP4Q/splits.txt +++ b/config/SALP4Q/splits.txt @@ -153,6 +153,11 @@ PowerPC_EABI_Support/MetroTRK/nubevent.c: .text start:0x803AB9DC end:0x803ABB78 .bss start:0x805A2848 end:0x805A2870 +PowerPC_EABI_Support/MetroTRK/nubinit.c: + .text start:0x803ABB78 end:0x803ABCC8 + .data start:0x8052D728 end:0x8052D748 + .sbss start:0x805F5EB0 end:0x805F5EB4 + PowerPC_EABI_Support/MetroTRK/mpc_7xx_603e.c: .text start:0x803AC484 end:0x803AC7AC diff --git a/config/SALP4Q/symbols.txt b/config/SALP4Q/symbols.txt index c2599e1..0314433 100644 --- a/config/SALP4Q/symbols.txt +++ b/config/SALP4Q/symbols.txt @@ -37598,7 +37598,7 @@ fn_803ABCC8 = .text:0x803ABCC8; // type:function size:0xCC TRKGetInput = .text:0x803ABD94; // type:function size:0x2C scope:global fn_803ABDC0 = .text:0x803ABDC0; // type:function size:0x40 TRKInitializeSerialHandler = .text:0x803ABE00; // type:function size:0x8 scope:global -fn_803ABE08 = .text:0x803ABE08; // type:function size:0x8 +TRKTerminateSerialHandler = .text:0x803ABE08; // type:function size:0x8 fn_803ABE10 = .text:0x803ABE10; // type:function size:0x1C fn_803ABE2C = .text:0x803ABE2C; // type:function size:0x1F4 fn_803AC020 = .text:0x803AC020; // type:function size:0x128 @@ -46305,7 +46305,7 @@ jumptable_8052D570 = .data:0x8052D570; // type:object size:0x6C scope:local TRK_ISR_OFFSETS = .data:0x8052D5E0; // type:object size:0x3C scope:local data:4byte @stringBase0 = .data:0x8052D620; // type:object size:0xE1 scope:local data:string_table lbl_8052D708 = .data:0x8052D708; // type:object size:0x1D data:string -@stringBase0 = .data:0x8052D728; // type:object size:0x1D scope:local data:string_table +@123 = .data:0x8052D728; // type:object size:0x1D scope:local data:string_table lbl_8052D748 = .data:0x8052D748; // type:object size:0x48 lbl_8052D790 = .data:0x8052D790; // type:object size:0x28 data:string lbl_8052D7B8 = .data:0x8052D7B8; // type:object size:0x28 data:string @@ -51267,7 +51267,7 @@ lbl_805F5E90 = .sbss:0x805F5E90; // type:object size:0x8 data:4byte TRK_mainError = .sbss:0x805F5E98; // type:object size:0x4 scope:local data:4byte lc_base = .sbss:0x805F5EA0; // type:object size:0x8 scope:local data:4byte TRK_Use_BBA = .sbss:0x805F5EA8; // type:object size:0x1 scope:global data:byte -lbl_805F5EB0 = .sbss:0x805F5EB0; // type:object size:0x8 data:4byte +gTRKBigEndian = .sbss:0x805F5EB0; // type:object size:0x4 data:4byte gTRKInputPendingPtr = .sbss:0x805F5EB8; // type:object size:0x4 scope:global data:4byte lbl_805F5EC0 = .sbss:0x805F5EC0; // type:object size:0x8 data:2byte lbl_805F5EC8 = .sbss:0x805F5EC8; // type:object size:0x4 data:4byte diff --git a/configure.py b/configure.py index 9d4624d..bdcaf4a 100644 --- a/configure.py +++ b/configure.py @@ -346,6 +346,7 @@ def MatchingFor(*versions): Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/mainloop.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/mpc_7xx_603e.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/nubevent.c"), + Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/nubinit.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/targimpl.c"), ] }, diff --git a/src/PowerPC_EABI_Support/MetroTRK/nubinit.c b/src/PowerPC_EABI_Support/MetroTRK/nubinit.c new file mode 100644 index 0000000..e68f79b --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/nubinit.c @@ -0,0 +1,65 @@ +#include "PowerPC_EABI_Support/MetroTRK/trk.h" + +BOOL gTRKBigEndian; + +DSError TRKInitializeNub(void) +{ + DSError ret; + DSError uartErr; + + ret = TRKInitializeEndian(); + + if (ret == DS_NoError) + TRKInitializeEventQueue(); + if (ret == DS_NoError) { + ret = TRKInitializeMessageBuffers(); + InitializeProgramEndTrap(); + } + if (ret == DS_NoError) + ret = TRKInitializeSerialHandler(); + if (ret == DS_NoError) + ret = TRKInitializeTarget(); + + if (ret == DS_NoError) { + uartErr = TRKInitializeIntDrivenUART(0x0000e100, 1, 0, (volatile u8**)&gTRKInputPendingPtr); + TRKTargetSetInputPendingPtr(gTRKInputPendingPtr); + if (uartErr != DS_NoError) { + ret = uartErr; + } + } + + return ret; +} + +DSError TRKTerminateNub(void) +{ + TRKTerminateSerialHandler(); + return DS_NoError; +} + +void TRKNubWelcome(void) +{ + TRK_board_display("MetroTRK for Revolution v0.4"); + return; +} + +BOOL TRKInitializeEndian(void) +{ + u8 bendian[4]; + BOOL result = FALSE; + gTRKBigEndian = TRUE; + + bendian[0] = 0x12; + bendian[1] = 0x34; + bendian[2] = 0x56; + bendian[3] = 0x78; + + if (*(u32*)bendian == 0x12345678) { + gTRKBigEndian = TRUE; + } else if (*(u32*)bendian == 0x78563412) { + gTRKBigEndian = FALSE; + } else { + result = TRUE; + } + return result; +} From d83332ad58586830b288137bf8ce7a2279c64ef3 Mon Sep 17 00:00:00 2001 From: DeathHound Date: Thu, 23 Apr 2026 11:21:22 +0100 Subject: [PATCH 09/15] Partial match serpoll.c --- config/SALP4Q/splits.txt | 3 + config/SALP4Q/symbols.txt | 8 +-- configure.py | 1 + src/PowerPC_EABI_Support/MetroTRK/serpoll.c | 64 +++++++++++++++++++++ 4 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 src/PowerPC_EABI_Support/MetroTRK/serpoll.c diff --git a/config/SALP4Q/splits.txt b/config/SALP4Q/splits.txt index 3550090..ead50eb 100644 --- a/config/SALP4Q/splits.txt +++ b/config/SALP4Q/splits.txt @@ -158,6 +158,9 @@ PowerPC_EABI_Support/MetroTRK/nubinit.c: .data start:0x8052D728 end:0x8052D748 .sbss start:0x805F5EB0 end:0x805F5EB4 +PowerPC_EABI_Support/MetroTRK/serpoll.c: + .text start:0x803ABCC8 end:0x803ABE10 + PowerPC_EABI_Support/MetroTRK/mpc_7xx_603e.c: .text start:0x803AC484 end:0x803AC7AC diff --git a/config/SALP4Q/symbols.txt b/config/SALP4Q/symbols.txt index 0314433..32e1d10 100644 --- a/config/SALP4Q/symbols.txt +++ b/config/SALP4Q/symbols.txt @@ -37577,7 +37577,7 @@ InitMetroTRKCommTable = .text:0x803AB670; // type:function size:0x138 scope:glob TRKUARTInterruptHandler = .text:0x803AB7A8; // type:function size:0x4 scope:global TRKInitializeIntDrivenUART = .text:0x803AB7AC; // type:function size:0x54 scope:global EnableEXI2Interrupts = .text:0x803AB800; // type:function size:0x2C -fn_803AB82C = .text:0x803AB82C; // type:function size:0x14 +TRKPollUART = .text:0x803AB82C; // type:function size:0x14 fn_803AB840 = .text:0x803AB840; // type:function size:0x3C fn_803AB87C = .text:0x803AB87C; // type:function size:0x3C ReserveEXI2Port = .text:0x803AB8B8; // type:function size:0x14 scope:global @@ -37594,9 +37594,9 @@ TRKInitializeNub = .text:0x803ABB78; // type:function size:0xAC scope:global TRKTerminateNub = .text:0x803ABC24; // type:function size:0x24 scope:global TRKNubWelcome = .text:0x803ABC48; // type:function size:0xC scope:global TRKInitializeEndian = .text:0x803ABC54; // type:function size:0x74 scope:global -fn_803ABCC8 = .text:0x803ABCC8; // type:function size:0xCC +TRKTestForPacket = .text:0x803ABCC8; // type:function size:0xCC TRKGetInput = .text:0x803ABD94; // type:function size:0x2C scope:global -fn_803ABDC0 = .text:0x803ABDC0; // type:function size:0x40 +TRKProcessInput = .text:0x803ABDC0; // type:function size:0x40 TRKInitializeSerialHandler = .text:0x803ABE00; // type:function size:0x8 scope:global TRKTerminateSerialHandler = .text:0x803ABE08; // type:function size:0x8 fn_803ABE10 = .text:0x803ABE10; // type:function size:0x1C @@ -37610,7 +37610,7 @@ TRKSaveExtended1Block = .text:0x803AC484; // type:function size:0x1C4 scope:glob TRKRestoreExtended1Block = .text:0x803AC648; // type:function size:0x164 scope:global fn_803AC7AC = .text:0x803AC7AC; // type:function size:0x64 TRKInitializeMessageBuffers = .text:0x803AC810; // type:function size:0x20 scope:global -fn_803AC830 = .text:0x803AC830; // type:function size:0x9C +TRKGetFreeBuffer = .text:0x803AC830; // type:function size:0x9C TRKGetBuffer = .text:0x803AC8CC; // type:function size:0x24 scope:global TRKReleaseBuffer = .text:0x803AC8F0; // type:function size:0x28 fn_803AC918 = .text:0x803AC918; // type:function size:0x28 diff --git a/configure.py b/configure.py index bdcaf4a..3ce5629 100644 --- a/configure.py +++ b/configure.py @@ -347,6 +347,7 @@ def MatchingFor(*versions): Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/mpc_7xx_603e.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/nubevent.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/nubinit.c"), + Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/serpoll.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/targimpl.c"), ] }, diff --git a/src/PowerPC_EABI_Support/MetroTRK/serpoll.c b/src/PowerPC_EABI_Support/MetroTRK/serpoll.c new file mode 100644 index 0000000..5de9572 --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/serpoll.c @@ -0,0 +1,64 @@ +#include "PowerPC_EABI_Support/MetroTRK/trk.h" + +void* gTRKInputPendingPtr; +static TRKFramingState gTRKFramingState; + +TRKBufferID TRKTestForPacket(void) +{ + int bytes; + int batch; + DSError err; + TRKBuffer* b; + int id; + + bytes = TRKPollUART(); + + if (bytes > 0) { + TRKGetFreeBuffer(&id, &b); + if (bytes > 0x880) { + for (; bytes > 0; bytes -= batch) { + batch = bytes > 0x880 ? 0x880 : bytes; + TRKReadUARTN(b->data, batch); + } + TRKStandardACK(b, DSMSG_ReplyNAK, 6); + } else { + err = TRKReadUARTN(b->data, bytes); + if (err == DS_NoError) { + b->length = bytes; + return id; + } + } + } + + if (id != -1) { + TRKReleaseBuffer(id); + } + return -1; +} + +void TRKGetInput(void) +{ + int bufID = TRKTestForPacket(); + if (bufID != -1) { + TRKProcessInput(bufID); + } +} + +void TRKProcessInput(TRKBufferID bufID) +{ + TRKEvent event; + + TRKConstructEvent(&event, 2); + event.msgBufID = bufID; + TRKPostEvent(&event); +} + +DSError TRKInitializeSerialHandler(void) +{ + return 0; +} + +DSError TRKTerminateSerialHandler(void) +{ + return 0; +} From e6beb297da41386e1a0686df3ebb65c6e2741891 Mon Sep 17 00:00:00 2001 From: DeathHound Date: Thu, 23 Apr 2026 11:32:10 +0100 Subject: [PATCH 10/15] Match + Link targcont.c --- config/SALP4Q/splits.txt | 3 +++ configure.py | 1 + src/PowerPC_EABI_Support/MetroTRK/targcont.c | 10 ++++++++++ src/Revolution/trk.h | 21 ++++++++++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 src/PowerPC_EABI_Support/MetroTRK/targcont.c create mode 100644 src/Revolution/trk.h diff --git a/config/SALP4Q/splits.txt b/config/SALP4Q/splits.txt index ead50eb..9891cef 100644 --- a/config/SALP4Q/splits.txt +++ b/config/SALP4Q/splits.txt @@ -161,6 +161,9 @@ PowerPC_EABI_Support/MetroTRK/nubinit.c: PowerPC_EABI_Support/MetroTRK/serpoll.c: .text start:0x803ABCC8 end:0x803ABE10 +PowerPC_EABI_Support/MetroTRK/targcont.c: + .text start:0x803AC450 end:0x803AC484 + PowerPC_EABI_Support/MetroTRK/mpc_7xx_603e.c: .text start:0x803AC484 end:0x803AC7AC diff --git a/configure.py b/configure.py index 3ce5629..1978cf3 100644 --- a/configure.py +++ b/configure.py @@ -348,6 +348,7 @@ def MatchingFor(*versions): Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/nubevent.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/nubinit.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/serpoll.c"), + Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/targcont.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/targimpl.c"), ] }, diff --git a/src/PowerPC_EABI_Support/MetroTRK/targcont.c b/src/PowerPC_EABI_Support/MetroTRK/targcont.c new file mode 100644 index 0000000..8b42aa1 --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/targcont.c @@ -0,0 +1,10 @@ +#include "Revolution/trk.h" + +unsigned int TRKTargetContinue(void) +{ + TRKTargetSetStopped(0); + UnreserveEXI2Port(); + TRKSwapAndGo(); + ReserveEXI2Port(); + return 0; +} diff --git a/src/Revolution/trk.h b/src/Revolution/trk.h new file mode 100644 index 0000000..3951fda --- /dev/null +++ b/src/Revolution/trk.h @@ -0,0 +1,21 @@ +#ifndef _REVOSDK_TRK_H + #define _REVOSDK_TRK_H + + #include "types.h" // IWYU pragma: keep + + #ifdef __cplusplus + extern "C" { + #endif + + unsigned int TRKTargetContinue(void); + void TRKTargetSetStopped(unsigned int); + void TRKSwapAndGo(); + + void UnreserveEXI2Port(); + void ReserveEXI2Port(); + + #ifdef __cplusplus + } + #endif + +#endif From 0f04dd2a18f9e180f5adb1dc4110effd8524989e Mon Sep 17 00:00:00 2001 From: DeathHound Date: Thu, 23 Apr 2026 16:44:41 +0100 Subject: [PATCH 11/15] Match + Link __exception.s --- config/SALP4Q/splits.txt | 3 + configure.py | 1 + .../MetroTRK/__exception.s | 1998 +++++++++++++++++ src/Revolution/OS/__start.c | 96 +- 4 files changed, 2050 insertions(+), 48 deletions(-) create mode 100644 src/PowerPC_EABI_Support/MetroTRK/__exception.s diff --git a/config/SALP4Q/splits.txt b/config/SALP4Q/splits.txt index 9891cef..796416d 100644 --- a/config/SALP4Q/splits.txt +++ b/config/SALP4Q/splits.txt @@ -202,3 +202,6 @@ Revolution/NAND/NANDLogging.c: PowerPC_EABI_Support/Runtime/__mem.c: .init start:0x80004364 end:0x800046E4 + +PowerPC_EABI_Support/MetroTRK/__exception.s: comment:0 + .init start:0x800046E4 end:0x80006618 diff --git a/configure.py b/configure.py index 1978cf3..e437f64 100644 --- a/configure.py +++ b/configure.py @@ -340,6 +340,7 @@ def MatchingFor(*versions): "host": False, "progress_category": "sdk", "objects": [ + Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/__exception.s"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/dolphin_trk.c"), Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/flush_cache.c"), Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/main_TRK.c"), diff --git a/src/PowerPC_EABI_Support/MetroTRK/__exception.s b/src/PowerPC_EABI_Support/MetroTRK/__exception.s new file mode 100644 index 0000000..b9a6831 --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/__exception.s @@ -0,0 +1,1998 @@ +.include "macros.inc" + +.section .init, "ax" # 0x800046E4 - 0x8000669C +.global gTRKInterruptVectorTable +gTRKInterruptVectorTable: +.asciz "Metrowerks Target Resident Kernel for PowerPC" +.balign 4 +/* 800046E4 000004E8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800046E8 000004EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800046EC 000004F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800046F0 000004F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800046F4 000004F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800046F8 000004FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800046FC 00000500 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004700 00000504 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004704 00000508 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004708 0000050C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000470C 00000510 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004710 00000514 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004714 00000518 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004718 0000051C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000471C 00000520 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004720 00000524 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004724 00000528 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004728 0000052C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000472C 00000530 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004730 00000534 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004734 00000538 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004738 0000053C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000473C 00000540 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004740 00000544 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004744 00000548 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004748 0000054C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000474C 00000550 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004750 00000554 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004754 00000558 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004758 0000055C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000475C 00000560 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004760 00000564 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004764 00000568 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004768 0000056C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000476C 00000570 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004770 00000574 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004774 00000578 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004778 0000057C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000477C 00000580 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004780 00000584 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004784 00000588 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004788 0000058C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000478C 00000590 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004790 00000594 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004794 00000598 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004798 0000059C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000479C 000005A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047A0 000005A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047A4 000005A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047A8 000005AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047AC 000005B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047B0 000005B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047B4 000005B8 48 00 1E 34 */ b 0x3a6dbc +/* 800047B8 000005BC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047BC 000005C0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047C0 000005C4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047C4 000005C8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047C8 000005CC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047CC 000005D0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047D0 000005D4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047D4 000005D8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047D8 000005DC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047DC 000005E0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047E0 000005E4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047E4 000005E8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047E8 000005EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047EC 000005F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047F0 000005F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047F4 000005F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047F8 000005FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800047FC 00000600 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004800 00000604 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004804 00000608 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004808 0000060C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000480C 00000610 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004810 00000614 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004814 00000618 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004818 0000061C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000481C 00000620 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004820 00000624 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004824 00000628 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004828 0000062C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000482C 00000630 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004830 00000634 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004834 00000638 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004838 0000063C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000483C 00000640 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004840 00000644 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004844 00000648 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004848 0000064C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000484C 00000650 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004850 00000654 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004854 00000658 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004858 0000065C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000485C 00000660 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004860 00000664 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004864 00000668 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004868 0000066C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000486C 00000670 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004870 00000674 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004874 00000678 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004878 0000067C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000487C 00000680 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004880 00000684 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004884 00000688 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004888 0000068C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000488C 00000690 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004890 00000694 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004894 00000698 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004898 0000069C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000489C 000006A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800048A0 000006A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800048A4 000006A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800048A8 000006AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800048AC 000006B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800048B0 000006B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800048B4 000006B8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800048B8 000006BC 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800048BC 000006C0 7C 00 17 AC */ icbi 0, r2 +/* 800048C0 000006C4 7C 53 02 A6 */ mfdar r2 +/* 800048C4 000006C8 7C 00 13 AC */ dcbi 0, r2 +/* 800048C8 000006CC 7C 51 42 A6 */ mfspr r2, 0x111 +/* 800048CC 000006D0 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800048D0 000006D4 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800048D4 000006D8 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800048D8 000006DC 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800048DC 000006E0 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800048E0 000006E4 7C 60 00 A6 */ mfmsr r3 +/* 800048E4 000006E8 60 63 00 30 */ ori r3, r3, 0x30 +/* 800048E8 000006EC 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800048EC 000006F0 3C 60 80 21 */ lis r3, 0x803a +/* 800048F0 000006F4 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 800048F4 000006F8 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800048F8 000006FC 38 60 02 00 */ li r3, 0x200 +/* 800048FC 00000700 4C 00 00 64 */ rfi +/* 80004900 00000704 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004904 00000708 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004908 0000070C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000490C 00000710 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004910 00000714 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004914 00000718 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004918 0000071C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000491C 00000720 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004920 00000724 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004924 00000728 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004928 0000072C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000492C 00000730 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004930 00000734 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004934 00000738 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004938 0000073C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000493C 00000740 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004940 00000744 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004944 00000748 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004948 0000074C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000494C 00000750 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004950 00000754 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004954 00000758 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004958 0000075C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000495C 00000760 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004960 00000764 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004964 00000768 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004968 0000076C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000496C 00000770 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004970 00000774 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004974 00000778 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004978 0000077C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000497C 00000780 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004980 00000784 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004984 00000788 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004988 0000078C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000498C 00000790 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004990 00000794 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004994 00000798 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004998 0000079C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000499C 000007A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049A0 000007A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049A4 000007A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049A8 000007AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049AC 000007B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049B0 000007B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049B4 000007B8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800049B8 000007BC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800049BC 000007C0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800049C0 000007C4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800049C4 000007C8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800049C8 000007CC 7C 60 00 A6 */ mfmsr r3 +/* 800049CC 000007D0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800049D0 000007D4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800049D4 000007D8 3C 60 80 21 */ lis r3, 0x803a +/* 800049D8 000007DC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 800049DC 000007E0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800049E0 000007E4 38 60 03 00 */ li r3, 0x300 +/* 800049E4 000007E8 4C 00 00 64 */ rfi +/* 800049E8 000007EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049EC 000007F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049F0 000007F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049F4 000007F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049F8 000007FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800049FC 00000800 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A00 00000804 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A04 00000808 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A08 0000080C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A0C 00000810 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A10 00000814 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A14 00000818 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A18 0000081C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A1C 00000820 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A20 00000824 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A24 00000828 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A28 0000082C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A2C 00000830 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A30 00000834 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A34 00000838 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A38 0000083C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A3C 00000840 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A40 00000844 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A44 00000848 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A48 0000084C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A4C 00000850 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A50 00000854 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A54 00000858 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A58 0000085C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A5C 00000860 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A60 00000864 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A64 00000868 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A68 0000086C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A6C 00000870 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A70 00000874 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A74 00000878 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A78 0000087C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A7C 00000880 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A80 00000884 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A84 00000888 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A88 0000088C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A8C 00000890 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A90 00000894 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A94 00000898 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A98 0000089C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004A9C 000008A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AA0 000008A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AA4 000008A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AA8 000008AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AAC 000008B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AB0 000008B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AB4 000008B8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 80004AB8 000008BC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 80004ABC 000008C0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 80004AC0 000008C4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80004AC4 000008C8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80004AC8 000008CC 7C 60 00 A6 */ mfmsr r3 +/* 80004ACC 000008D0 60 63 00 30 */ ori r3, r3, 0x30 +/* 80004AD0 000008D4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80004AD4 000008D8 3C 60 80 21 */ lis r3, 0x803a +/* 80004AD8 000008DC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 80004ADC 000008E0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80004AE0 000008E4 38 60 04 00 */ li r3, 0x400 +/* 80004AE4 000008E8 4C 00 00 64 */ rfi +/* 80004AE8 000008EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AEC 000008F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AF0 000008F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AF4 000008F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AF8 000008FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004AFC 00000900 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B00 00000904 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B04 00000908 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B08 0000090C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B0C 00000910 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B10 00000914 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B14 00000918 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B18 0000091C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B1C 00000920 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B20 00000924 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B24 00000928 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B28 0000092C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B2C 00000930 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B30 00000934 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B34 00000938 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B38 0000093C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B3C 00000940 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B40 00000944 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B44 00000948 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B48 0000094C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B4C 00000950 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B50 00000954 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B54 00000958 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B58 0000095C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B5C 00000960 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B60 00000964 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B64 00000968 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B68 0000096C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B6C 00000970 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B70 00000974 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B74 00000978 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B78 0000097C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B7C 00000980 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B80 00000984 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B84 00000988 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B88 0000098C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B8C 00000990 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B90 00000994 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B94 00000998 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B98 0000099C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004B9C 000009A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BA0 000009A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BA4 000009A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BA8 000009AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BAC 000009B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BB0 000009B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BB4 000009B8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 80004BB8 000009BC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 80004BBC 000009C0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 80004BC0 000009C4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80004BC4 000009C8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80004BC8 000009CC 7C 60 00 A6 */ mfmsr r3 +/* 80004BCC 000009D0 60 63 00 30 */ ori r3, r3, 0x30 +/* 80004BD0 000009D4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80004BD4 000009D8 3C 60 80 21 */ lis r3, 0x803a +/* 80004BD8 000009DC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 80004BDC 000009E0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80004BE0 000009E4 38 60 05 00 */ li r3, 0x500 +/* 80004BE4 000009E8 4C 00 00 64 */ rfi +/* 80004BE8 000009EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BEC 000009F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BF0 000009F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BF4 000009F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BF8 000009FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004BFC 00000A00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C00 00000A04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C04 00000A08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C08 00000A0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C0C 00000A10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C10 00000A14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C14 00000A18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C18 00000A1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C1C 00000A20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C20 00000A24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C24 00000A28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C28 00000A2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C2C 00000A30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C30 00000A34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C34 00000A38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C38 00000A3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C3C 00000A40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C40 00000A44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C44 00000A48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C48 00000A4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C4C 00000A50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C50 00000A54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C54 00000A58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C58 00000A5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C5C 00000A60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C60 00000A64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C64 00000A68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C68 00000A6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C6C 00000A70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C70 00000A74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C74 00000A78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C78 00000A7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C7C 00000A80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C80 00000A84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C84 00000A88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C88 00000A8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C8C 00000A90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C90 00000A94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C94 00000A98 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C98 00000A9C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004C9C 00000AA0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CA0 00000AA4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CA4 00000AA8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CA8 00000AAC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CAC 00000AB0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CB0 00000AB4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CB4 00000AB8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 80004CB8 00000ABC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 80004CBC 00000AC0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 80004CC0 00000AC4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80004CC4 00000AC8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80004CC8 00000ACC 7C 60 00 A6 */ mfmsr r3 +/* 80004CCC 00000AD0 60 63 00 30 */ ori r3, r3, 0x30 +/* 80004CD0 00000AD4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80004CD4 00000AD8 3C 60 80 21 */ lis r3, 0x803a +/* 80004CD8 00000ADC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 80004CDC 00000AE0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80004CE0 00000AE4 38 60 06 00 */ li r3, 0x600 +/* 80004CE4 00000AE8 4C 00 00 64 */ rfi +/* 80004CE8 00000AEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CEC 00000AF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CF0 00000AF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CF4 00000AF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CF8 00000AFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004CFC 00000B00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D00 00000B04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D04 00000B08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D08 00000B0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D0C 00000B10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D10 00000B14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D14 00000B18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D18 00000B1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D1C 00000B20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D20 00000B24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D24 00000B28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D28 00000B2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D2C 00000B30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D30 00000B34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D34 00000B38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D38 00000B3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D3C 00000B40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D40 00000B44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D44 00000B48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D48 00000B4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D4C 00000B50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D50 00000B54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D54 00000B58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D58 00000B5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D5C 00000B60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D60 00000B64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D64 00000B68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D68 00000B6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D6C 00000B70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D70 00000B74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D74 00000B78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D78 00000B7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D7C 00000B80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D80 00000B84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D84 00000B88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D88 00000B8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D8C 00000B90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D90 00000B94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D94 00000B98 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D98 00000B9C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004D9C 00000BA0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DA0 00000BA4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DA4 00000BA8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DA8 00000BAC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DAC 00000BB0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DB0 00000BB4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DB4 00000BB8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 80004DB8 00000BBC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 80004DBC 00000BC0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 80004DC0 00000BC4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80004DC4 00000BC8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80004DC8 00000BCC 7C 60 00 A6 */ mfmsr r3 +/* 80004DCC 00000BD0 60 63 00 30 */ ori r3, r3, 0x30 +/* 80004DD0 00000BD4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80004DD4 00000BD8 3C 60 80 21 */ lis r3, 0x803a +/* 80004DD8 00000BDC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 80004DDC 00000BE0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80004DE0 00000BE4 38 60 07 00 */ li r3, 0x700 +/* 80004DE4 00000BE8 4C 00 00 64 */ rfi +/* 80004DE8 00000BEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DEC 00000BF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DF0 00000BF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DF4 00000BF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DF8 00000BFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004DFC 00000C00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E00 00000C04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E04 00000C08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E08 00000C0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E0C 00000C10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E10 00000C14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E14 00000C18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E18 00000C1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E1C 00000C20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E20 00000C24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E24 00000C28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E28 00000C2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E2C 00000C30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E30 00000C34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E34 00000C38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E38 00000C3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E3C 00000C40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E40 00000C44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E44 00000C48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E48 00000C4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E4C 00000C50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E50 00000C54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E54 00000C58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E58 00000C5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E5C 00000C60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E60 00000C64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E64 00000C68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E68 00000C6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E6C 00000C70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E70 00000C74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E74 00000C78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E78 00000C7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E7C 00000C80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E80 00000C84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E84 00000C88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E88 00000C8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E8C 00000C90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E90 00000C94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E94 00000C98 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E98 00000C9C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004E9C 00000CA0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EA0 00000CA4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EA4 00000CA8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EA8 00000CAC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EAC 00000CB0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EB0 00000CB4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EB4 00000CB8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 80004EB8 00000CBC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 80004EBC 00000CC0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 80004EC0 00000CC4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80004EC4 00000CC8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80004EC8 00000CCC 7C 60 00 A6 */ mfmsr r3 +/* 80004ECC 00000CD0 60 63 00 30 */ ori r3, r3, 0x30 +/* 80004ED0 00000CD4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80004ED4 00000CD8 3C 60 80 21 */ lis r3, 0x803a +/* 80004ED8 00000CDC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 80004EDC 00000CE0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80004EE0 00000CE4 38 60 08 00 */ li r3, 0x800 +/* 80004EE4 00000CE8 4C 00 00 64 */ rfi +/* 80004EE8 00000CEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EEC 00000CF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EF0 00000CF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EF4 00000CF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EF8 00000CFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004EFC 00000D00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F00 00000D04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F04 00000D08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F08 00000D0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F0C 00000D10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F10 00000D14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F14 00000D18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F18 00000D1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F1C 00000D20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F20 00000D24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F24 00000D28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F28 00000D2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F2C 00000D30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F30 00000D34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F34 00000D38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F38 00000D3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F3C 00000D40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F40 00000D44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F44 00000D48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F48 00000D4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F4C 00000D50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F50 00000D54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F54 00000D58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F58 00000D5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F5C 00000D60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F60 00000D64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F64 00000D68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F68 00000D6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F6C 00000D70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F70 00000D74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F74 00000D78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F78 00000D7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F7C 00000D80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F80 00000D84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F84 00000D88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F88 00000D8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F8C 00000D90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F90 00000D94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F94 00000D98 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F98 00000D9C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004F9C 00000DA0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FA0 00000DA4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FA4 00000DA8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FA8 00000DAC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FAC 00000DB0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FB0 00000DB4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FB4 00000DB8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 80004FB8 00000DBC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 80004FBC 00000DC0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 80004FC0 00000DC4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80004FC4 00000DC8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80004FC8 00000DCC 7C 60 00 A6 */ mfmsr r3 +/* 80004FCC 00000DD0 60 63 00 30 */ ori r3, r3, 0x30 +/* 80004FD0 00000DD4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80004FD4 00000DD8 3C 60 80 21 */ lis r3, 0x803a +/* 80004FD8 00000DDC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 80004FDC 00000DE0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80004FE0 00000DE4 38 60 09 00 */ li r3, 0x900 +/* 80004FE4 00000DE8 4C 00 00 64 */ rfi +/* 80004FE8 00000DEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FEC 00000DF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FF0 00000DF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FF4 00000DF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FF8 00000DFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80004FFC 00000E00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005000 00000E04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005004 00000E08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005008 00000E0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000500C 00000E10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005010 00000E14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005014 00000E18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005018 00000E1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000501C 00000E20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005020 00000E24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005024 00000E28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005028 00000E2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000502C 00000E30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005030 00000E34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005034 00000E38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005038 00000E3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000503C 00000E40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005040 00000E44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005044 00000E48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005048 00000E4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000504C 00000E50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005050 00000E54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005054 00000E58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005058 00000E5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000505C 00000E60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005060 00000E64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005064 00000E68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005068 00000E6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000506C 00000E70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005070 00000E74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005074 00000E78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005078 00000E7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000507C 00000E80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005080 00000E84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005084 00000E88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005088 00000E8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000508C 00000E90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005090 00000E94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005094 00000E98 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005098 00000E9C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000509C 00000EA0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050A0 00000EA4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050A4 00000EA8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050A8 00000EAC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050AC 00000EB0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050B0 00000EB4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050B4 00000EB8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050B8 00000EBC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050BC 00000EC0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050C0 00000EC4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050C4 00000EC8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050C8 00000ECC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050CC 00000ED0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050D0 00000ED4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050D4 00000ED8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050D8 00000EDC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050DC 00000EE0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050E0 00000EE4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050E4 00000EE8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050E8 00000EEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050EC 00000EF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050F0 00000EF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050F4 00000EF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050F8 00000EFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800050FC 00000F00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005100 00000F04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005104 00000F08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005108 00000F0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000510C 00000F10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005110 00000F14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005114 00000F18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005118 00000F1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000511C 00000F20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005120 00000F24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005124 00000F28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005128 00000F2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000512C 00000F30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005130 00000F34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005134 00000F38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005138 00000F3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000513C 00000F40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005140 00000F44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005144 00000F48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005148 00000F4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000514C 00000F50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005150 00000F54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005154 00000F58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005158 00000F5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000515C 00000F60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005160 00000F64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005164 00000F68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005168 00000F6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000516C 00000F70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005170 00000F74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005174 00000F78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005178 00000F7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000517C 00000F80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005180 00000F84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005184 00000F88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005188 00000F8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000518C 00000F90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005190 00000F94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005194 00000F98 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005198 00000F9C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000519C 00000FA0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051A0 00000FA4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051A4 00000FA8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051A8 00000FAC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051AC 00000FB0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051B0 00000FB4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051B4 00000FB8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051B8 00000FBC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051BC 00000FC0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051C0 00000FC4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051C4 00000FC8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051C8 00000FCC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051CC 00000FD0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051D0 00000FD4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051D4 00000FD8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051D8 00000FDC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051DC 00000FE0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051E0 00000FE4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051E4 00000FE8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051E8 00000FEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051EC 00000FF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051F0 00000FF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051F4 00000FF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051F8 00000FFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800051FC 00001000 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005200 00001004 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005204 00001008 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005208 0000100C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000520C 00001010 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005210 00001014 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005214 00001018 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005218 0000101C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000521C 00001020 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005220 00001024 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005224 00001028 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005228 0000102C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000522C 00001030 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005230 00001034 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005234 00001038 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005238 0000103C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000523C 00001040 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005240 00001044 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005244 00001048 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005248 0000104C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000524C 00001050 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005250 00001054 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005254 00001058 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005258 0000105C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000525C 00001060 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005260 00001064 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005264 00001068 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005268 0000106C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000526C 00001070 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005270 00001074 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005274 00001078 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005278 0000107C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000527C 00001080 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005280 00001084 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005284 00001088 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005288 0000108C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000528C 00001090 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005290 00001094 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005294 00001098 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005298 0000109C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000529C 000010A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800052A0 000010A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800052A4 000010A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800052A8 000010AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800052AC 000010B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800052B0 000010B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800052B4 000010B8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800052B8 000010BC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800052BC 000010C0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800052C0 000010C4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800052C4 000010C8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800052C8 000010CC 7C 60 00 A6 */ mfmsr r3 +/* 800052CC 000010D0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800052D0 000010D4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800052D4 000010D8 3C 60 80 21 */ lis r3, 0x803a +/* 800052D8 000010DC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 800052DC 000010E0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800052E0 000010E4 38 60 0C 00 */ li r3, 0xc00 +/* 800052E4 000010E8 4C 00 00 64 */ rfi +/* 800052E8 000010EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800052EC 000010F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800052F0 000010F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800052F4 000010F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800052F8 000010FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800052FC 00001100 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005300 00001104 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005304 00001108 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005308 0000110C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000530C 00001110 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005310 00001114 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005314 00001118 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005318 0000111C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000531C 00001120 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005320 00001124 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005324 00001128 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005328 0000112C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000532C 00001130 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005330 00001134 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005334 00001138 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005338 0000113C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000533C 00001140 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005340 00001144 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005344 00001148 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005348 0000114C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000534C 00001150 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005350 00001154 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005354 00001158 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005358 0000115C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000535C 00001160 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005360 00001164 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005364 00001168 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005368 0000116C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000536C 00001170 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005370 00001174 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005374 00001178 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005378 0000117C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000537C 00001180 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005380 00001184 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005384 00001188 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005388 0000118C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000538C 00001190 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005390 00001194 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005394 00001198 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005398 0000119C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000539C 000011A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800053A0 000011A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800053A4 000011A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800053A8 000011AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800053AC 000011B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800053B0 000011B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800053B4 000011B8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800053B8 000011BC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800053BC 000011C0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800053C0 000011C4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800053C4 000011C8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800053C8 000011CC 7C 60 00 A6 */ mfmsr r3 +/* 800053CC 000011D0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800053D0 000011D4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800053D4 000011D8 3C 60 80 21 */ lis r3, 0x803a +/* 800053D8 000011DC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 800053DC 000011E0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800053E0 000011E4 38 60 0D 00 */ li r3, 0xd00 +/* 800053E4 000011E8 4C 00 00 64 */ rfi +/* 800053E8 000011EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800053EC 000011F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800053F0 000011F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800053F4 000011F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800053F8 000011FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800053FC 00001200 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005400 00001204 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005404 00001208 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005408 0000120C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000540C 00001210 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005410 00001214 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005414 00001218 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005418 0000121C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000541C 00001220 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005420 00001224 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005424 00001228 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005428 0000122C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000542C 00001230 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005430 00001234 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005434 00001238 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005438 0000123C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000543C 00001240 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005440 00001244 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005444 00001248 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005448 0000124C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000544C 00001250 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005450 00001254 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005454 00001258 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005458 0000125C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000545C 00001260 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005460 00001264 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005464 00001268 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005468 0000126C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000546C 00001270 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005470 00001274 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005474 00001278 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005478 0000127C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000547C 00001280 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005480 00001284 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005484 00001288 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005488 0000128C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000548C 00001290 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005490 00001294 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005494 00001298 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005498 0000129C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000549C 000012A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800054A0 000012A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800054A4 000012A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800054A8 000012AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800054AC 000012B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800054B0 000012B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800054B4 000012B8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800054B8 000012BC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800054BC 000012C0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800054C0 000012C4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800054C4 000012C8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800054C8 000012CC 7C 60 00 A6 */ mfmsr r3 +/* 800054CC 000012D0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800054D0 000012D4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800054D4 000012D8 3C 60 80 21 */ lis r3, 0x803a +/* 800054D8 000012DC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 800054DC 000012E0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800054E0 000012E4 38 60 0E 00 */ li r3, 0xe00 +/* 800054E4 000012E8 4C 00 00 64 */ rfi +/* 800054E8 000012EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800054EC 000012F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800054F0 000012F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800054F4 000012F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800054F8 000012FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800054FC 00001300 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005500 00001304 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005504 00001308 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005508 0000130C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000550C 00001310 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005510 00001314 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005514 00001318 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005518 0000131C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000551C 00001320 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005520 00001324 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005524 00001328 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005528 0000132C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000552C 00001330 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005530 00001334 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005534 00001338 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005538 0000133C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000553C 00001340 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005540 00001344 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005544 00001348 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005548 0000134C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000554C 00001350 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005550 00001354 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005554 00001358 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005558 0000135C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000555C 00001360 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005560 00001364 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005564 00001368 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005568 0000136C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000556C 00001370 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005570 00001374 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005574 00001378 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005578 0000137C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000557C 00001380 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005580 00001384 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005584 00001388 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005588 0000138C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000558C 00001390 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005590 00001394 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005594 00001398 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005598 0000139C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000559C 000013A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800055A0 000013A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800055A4 000013A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800055A8 000013AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800055AC 000013B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800055B0 000013B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800055B4 000013B8 48 00 00 54 */ b .L_8000440C +/* 800055B8 000013BC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800055BC 000013C0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800055C0 000013C4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800055C4 000013C8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800055C8 000013CC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800055CC 000013D0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800055D0 000013D4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800055D4 000013D8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800055D8 000013DC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800055DC 000013E0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800055E0 000013E4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800055E4 000013E8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800055E8 000013EC 7C 60 00 A6 */ mfmsr r3 +/* 800055EC 000013F0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800055F0 000013F4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800055F4 000013F8 3C 60 80 21 */ lis r3, 0x803a +/* 800055F8 000013FC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 800055FC 00001400 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80005600 00001404 38 60 0F 20 */ li r3, 0xf20 +/* 80005604 00001408 4C 00 00 64 */ rfi +.L_8000440C: +/* 80005608 0000140C 7C 51 43 A6 */ mtspr 0x111, r2 +/* 8000560C 00001410 7C 72 43 A6 */ mtspr 0x112, r3 +/* 80005610 00001414 7C 93 43 A6 */ mtspr 0x113, r4 +/* 80005614 00001418 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80005618 0000141C 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 8000561C 00001420 7C 60 00 A6 */ mfmsr r3 +/* 80005620 00001424 60 63 00 30 */ ori r3, r3, 0x30 +/* 80005624 00001428 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80005628 0000142C 3C 60 80 21 */ lis r3, 0x803a +/* 8000562C 00001430 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 80005630 00001434 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80005634 00001438 38 60 0F 00 */ li r3, 0xf00 +/* 80005638 0000143C 4C 00 00 64 */ rfi +/* 8000563C 00001440 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005640 00001444 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005644 00001448 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005648 0000144C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000564C 00001450 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005650 00001454 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005654 00001458 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005658 0000145C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000565C 00001460 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005660 00001464 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005664 00001468 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005668 0000146C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000566C 00001470 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005670 00001474 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005674 00001478 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005678 0000147C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000567C 00001480 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005680 00001484 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005684 00001488 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005688 0000148C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000568C 00001490 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005690 00001494 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005694 00001498 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005698 0000149C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000569C 000014A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800056A0 000014A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800056A4 000014A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800056A8 000014AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800056AC 000014B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800056B0 000014B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800056B4 000014B8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800056B8 000014BC 7C 40 00 26 */ mfcr r2 +/* 800056BC 000014C0 7C 52 43 A6 */ mtspr 0x112, r2 +/* 800056C0 000014C4 7C 40 00 A6 */ mfmsr r2 +/* 800056C4 000014C8 74 42 00 02 */ andis. r2, r2, 2 +/* 800056C8 000014CC 41 82 00 1C */ beq .L_800044E8 +/* 800056CC 000014D0 7C 40 00 A6 */ mfmsr r2 +/* 800056D0 000014D4 6C 42 00 02 */ xoris r2, r2, 2 +/* 800056D4 000014D8 7C 00 04 AC */ sync 0 +/* 800056D8 000014DC 7C 40 01 24 */ mtmsr r2 +/* 800056DC 000014E0 7C 00 04 AC */ sync 0 +/* 800056E0 000014E4 7C 51 43 A6 */ mtspr 0x111, r2 +.L_800044E8: +/* 800056E4 000014E8 7C 52 42 A6 */ mfspr r2, 0x112 +/* 800056E8 000014EC 7C 4F F1 20 */ mtcrf 0xff, r2 +/* 800056EC 000014F0 7C 51 42 A6 */ mfspr r2, 0x111 +/* 800056F0 000014F4 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800056F4 000014F8 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800056F8 000014FC 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800056FC 00001500 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80005700 00001504 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80005704 00001508 7C 60 00 A6 */ mfmsr r3 +/* 80005708 0000150C 60 63 00 30 */ ori r3, r3, 0x30 +/* 8000570C 00001510 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80005710 00001514 3C 60 80 21 */ lis r3, 0x803a +/* 80005714 00001518 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 80005718 0000151C 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 8000571C 00001520 38 60 10 00 */ li r3, 0x1000 +/* 80005720 00001524 4C 00 00 64 */ rfi +/* 80005724 00001528 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005728 0000152C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000572C 00001530 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005730 00001534 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005734 00001538 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005738 0000153C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000573C 00001540 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005740 00001544 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005744 00001548 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005748 0000154C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000574C 00001550 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005750 00001554 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005754 00001558 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005758 0000155C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000575C 00001560 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005760 00001564 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005764 00001568 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005768 0000156C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000576C 00001570 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005770 00001574 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005774 00001578 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005778 0000157C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000577C 00001580 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005780 00001584 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005784 00001588 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005788 0000158C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000578C 00001590 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005790 00001594 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005794 00001598 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005798 0000159C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000579C 000015A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800057A0 000015A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800057A4 000015A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800057A8 000015AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800057AC 000015B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800057B0 000015B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800057B4 000015B8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800057B8 000015BC 7C 40 00 26 */ mfcr r2 +/* 800057BC 000015C0 7C 52 43 A6 */ mtspr 0x112, r2 +/* 800057C0 000015C4 7C 40 00 A6 */ mfmsr r2 +/* 800057C4 000015C8 74 42 00 02 */ andis. r2, r2, 2 +/* 800057C8 000015CC 41 82 00 1C */ beq .L_800045E8 +/* 800057CC 000015D0 7C 40 00 A6 */ mfmsr r2 +/* 800057D0 000015D4 6C 42 00 02 */ xoris r2, r2, 2 +/* 800057D4 000015D8 7C 00 04 AC */ sync 0 +/* 800057D8 000015DC 7C 40 01 24 */ mtmsr r2 +/* 800057DC 000015E0 7C 00 04 AC */ sync 0 +/* 800057E0 000015E4 7C 51 43 A6 */ mtspr 0x111, r2 +.L_800045E8: +/* 800057E4 000015E8 7C 52 42 A6 */ mfspr r2, 0x112 +/* 800057E8 000015EC 7C 4F F1 20 */ mtcrf 0xff, r2 +/* 800057EC 000015F0 7C 51 42 A6 */ mfspr r2, 0x111 +/* 800057F0 000015F4 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800057F4 000015F8 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800057F8 000015FC 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800057FC 00001600 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80005800 00001604 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80005804 00001608 7C 60 00 A6 */ mfmsr r3 +/* 80005808 0000160C 60 63 00 30 */ ori r3, r3, 0x30 +/* 8000580C 00001610 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80005810 00001614 3C 60 80 21 */ lis r3, 0x803a +/* 80005814 00001618 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 80005818 0000161C 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 8000581C 00001620 38 60 11 00 */ li r3, 0x1100 +/* 80005820 00001624 4C 00 00 64 */ rfi +/* 80005824 00001628 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005828 0000162C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000582C 00001630 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005830 00001634 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005834 00001638 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005838 0000163C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000583C 00001640 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005840 00001644 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005844 00001648 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005848 0000164C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000584C 00001650 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005850 00001654 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005854 00001658 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005858 0000165C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000585C 00001660 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005860 00001664 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005864 00001668 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005868 0000166C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000586C 00001670 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005870 00001674 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005874 00001678 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005878 0000167C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000587C 00001680 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005880 00001684 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005884 00001688 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005888 0000168C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000588C 00001690 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005890 00001694 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005894 00001698 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005898 0000169C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000589C 000016A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800058A0 000016A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800058A4 000016A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800058A8 000016AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800058AC 000016B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800058B0 000016B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800058B4 000016B8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800058B8 000016BC 7C 40 00 26 */ mfcr r2 +/* 800058BC 000016C0 7C 52 43 A6 */ mtspr 0x112, r2 +/* 800058C0 000016C4 7C 40 00 A6 */ mfmsr r2 +/* 800058C4 000016C8 74 42 00 02 */ andis. r2, r2, 2 +/* 800058C8 000016CC 41 82 00 1C */ beq .L_800046E8 +/* 800058CC 000016D0 7C 40 00 A6 */ mfmsr r2 +/* 800058D0 000016D4 6C 42 00 02 */ xoris r2, r2, 2 +/* 800058D4 000016D8 7C 00 04 AC */ sync 0 +/* 800058D8 000016DC 7C 40 01 24 */ mtmsr r2 +/* 800058DC 000016E0 7C 00 04 AC */ sync 0 +/* 800058E0 000016E4 7C 51 43 A6 */ mtspr 0x111, r2 +.L_800046E8: +/* 800058E4 000016E8 7C 52 42 A6 */ mfspr r2, 0x112 +/* 800058E8 000016EC 7C 4F F1 20 */ mtcrf 0xff, r2 +/* 800058EC 000016F0 7C 51 42 A6 */ mfspr r2, 0x111 +/* 800058F0 000016F4 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800058F4 000016F8 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800058F8 000016FC 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800058FC 00001700 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80005900 00001704 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80005904 00001708 7C 60 00 A6 */ mfmsr r3 +/* 80005908 0000170C 60 63 00 30 */ ori r3, r3, 0x30 +/* 8000590C 00001710 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80005910 00001714 3C 60 80 21 */ lis r3, 0x803a +/* 80005914 00001718 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 80005918 0000171C 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 8000591C 00001720 38 60 12 00 */ li r3, 0x1200 +/* 80005920 00001724 4C 00 00 64 */ rfi +/* 80005924 00001728 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005928 0000172C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000592C 00001730 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005930 00001734 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005934 00001738 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005938 0000173C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000593C 00001740 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005940 00001744 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005944 00001748 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005948 0000174C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000594C 00001750 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005950 00001754 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005954 00001758 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005958 0000175C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000595C 00001760 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005960 00001764 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005964 00001768 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005968 0000176C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000596C 00001770 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005970 00001774 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005974 00001778 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005978 0000177C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000597C 00001780 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005980 00001784 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005984 00001788 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005988 0000178C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000598C 00001790 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005990 00001794 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005994 00001798 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005998 0000179C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000599C 000017A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800059A0 000017A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800059A4 000017A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800059A8 000017AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800059AC 000017B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800059B0 000017B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800059B4 000017B8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800059B8 000017BC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800059BC 000017C0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800059C0 000017C4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800059C4 000017C8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800059C8 000017CC 7C 60 00 A6 */ mfmsr r3 +/* 800059CC 000017D0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800059D0 000017D4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800059D4 000017D8 3C 60 80 21 */ lis r3, 0x803a +/* 800059D8 000017DC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 800059DC 000017E0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800059E0 000017E4 38 60 13 00 */ li r3, 0x1300 +/* 800059E4 000017E8 4C 00 00 64 */ rfi +/* 800059E8 000017EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800059EC 000017F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800059F0 000017F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800059F4 000017F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800059F8 000017FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800059FC 00001800 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A00 00001804 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A04 00001808 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A08 0000180C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A0C 00001810 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A10 00001814 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A14 00001818 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A18 0000181C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A1C 00001820 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A20 00001824 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A24 00001828 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A28 0000182C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A2C 00001830 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A30 00001834 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A34 00001838 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A38 0000183C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A3C 00001840 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A40 00001844 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A44 00001848 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A48 0000184C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A4C 00001850 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A50 00001854 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A54 00001858 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A58 0000185C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A5C 00001860 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A60 00001864 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A64 00001868 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A68 0000186C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A6C 00001870 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A70 00001874 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A74 00001878 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A78 0000187C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A7C 00001880 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A80 00001884 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A84 00001888 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A88 0000188C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A8C 00001890 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A90 00001894 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A94 00001898 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A98 0000189C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005A9C 000018A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005AA0 000018A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005AA4 000018A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005AA8 000018AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005AAC 000018B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005AB0 000018B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005AB4 000018B8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 80005AB8 000018BC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 80005ABC 000018C0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 80005AC0 000018C4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80005AC4 000018C8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80005AC8 000018CC 7C 60 00 A6 */ mfmsr r3 +/* 80005ACC 000018D0 60 63 00 30 */ ori r3, r3, 0x30 +/* 80005AD0 000018D4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80005AD4 000018D8 3C 60 80 21 */ lis r3, 0x803a +/* 80005AD8 000018DC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 80005ADC 000018E0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80005AE0 000018E4 38 60 14 00 */ li r3, 0x1400 +/* 80005AE4 000018E8 4C 00 00 64 */ rfi +/* 80005AE8 000018EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005AEC 000018F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005AF0 000018F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005AF4 000018F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005AF8 000018FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005AFC 00001900 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B00 00001904 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B04 00001908 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B08 0000190C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B0C 00001910 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B10 00001914 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B14 00001918 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B18 0000191C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B1C 00001920 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B20 00001924 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B24 00001928 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B28 0000192C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B2C 00001930 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B30 00001934 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B34 00001938 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B38 0000193C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B3C 00001940 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B40 00001944 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B44 00001948 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B48 0000194C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B4C 00001950 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B50 00001954 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B54 00001958 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B58 0000195C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B5C 00001960 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B60 00001964 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B64 00001968 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B68 0000196C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B6C 00001970 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B70 00001974 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B74 00001978 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B78 0000197C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B7C 00001980 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B80 00001984 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B84 00001988 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B88 0000198C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B8C 00001990 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B90 00001994 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B94 00001998 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B98 0000199C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005B9C 000019A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BA0 000019A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BA4 000019A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BA8 000019AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BAC 000019B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BB0 000019B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BB4 000019B8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BB8 000019BC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BBC 000019C0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BC0 000019C4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BC4 000019C8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BC8 000019CC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BCC 000019D0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BD0 000019D4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BD4 000019D8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BD8 000019DC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BDC 000019E0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BE0 000019E4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BE4 000019E8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BE8 000019EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BEC 000019F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BF0 000019F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BF4 000019F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BF8 000019FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005BFC 00001A00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C00 00001A04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C04 00001A08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C08 00001A0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C0C 00001A10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C10 00001A14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C14 00001A18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C18 00001A1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C1C 00001A20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C20 00001A24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C24 00001A28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C28 00001A2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C2C 00001A30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C30 00001A34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C34 00001A38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C38 00001A3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C3C 00001A40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C40 00001A44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C44 00001A48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C48 00001A4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C4C 00001A50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C50 00001A54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C54 00001A58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C58 00001A5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C5C 00001A60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C60 00001A64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C64 00001A68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C68 00001A6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C6C 00001A70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C70 00001A74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C74 00001A78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C78 00001A7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C7C 00001A80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C80 00001A84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C84 00001A88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C88 00001A8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C8C 00001A90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C90 00001A94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C94 00001A98 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C98 00001A9C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005C9C 00001AA0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005CA0 00001AA4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005CA4 00001AA8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005CA8 00001AAC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005CAC 00001AB0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005CB0 00001AB4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005CB4 00001AB8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 80005CB8 00001ABC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 80005CBC 00001AC0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 80005CC0 00001AC4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80005CC4 00001AC8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80005CC8 00001ACC 7C 60 00 A6 */ mfmsr r3 +/* 80005CCC 00001AD0 60 63 00 30 */ ori r3, r3, 0x30 +/* 80005CD0 00001AD4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80005CD4 00001AD8 3C 60 80 21 */ lis r3, 0x803a +/* 80005CD8 00001ADC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 80005CDC 00001AE0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80005CE0 00001AE4 38 60 16 00 */ li r3, 0x1600 +/* 80005CE4 00001AE8 4C 00 00 64 */ rfi +/* 80005CE8 00001AEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005CEC 00001AF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005CF0 00001AF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005CF4 00001AF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005CF8 00001AFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005CFC 00001B00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D00 00001B04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D04 00001B08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D08 00001B0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D0C 00001B10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D10 00001B14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D14 00001B18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D18 00001B1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D1C 00001B20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D20 00001B24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D24 00001B28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D28 00001B2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D2C 00001B30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D30 00001B34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D34 00001B38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D38 00001B3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D3C 00001B40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D40 00001B44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D44 00001B48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D48 00001B4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D4C 00001B50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D50 00001B54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D54 00001B58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D58 00001B5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D5C 00001B60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D60 00001B64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D64 00001B68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D68 00001B6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D6C 00001B70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D70 00001B74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D74 00001B78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D78 00001B7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D7C 00001B80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D80 00001B84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D84 00001B88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D88 00001B8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D8C 00001B90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D90 00001B94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D94 00001B98 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D98 00001B9C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005D9C 00001BA0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005DA0 00001BA4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005DA4 00001BA8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005DA8 00001BAC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005DAC 00001BB0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005DB0 00001BB4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005DB4 00001BB8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 80005DB8 00001BBC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 80005DBC 00001BC0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 80005DC0 00001BC4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 80005DC4 00001BC8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 80005DC8 00001BCC 7C 60 00 A6 */ mfmsr r3 +/* 80005DCC 00001BD0 60 63 00 30 */ ori r3, r3, 0x30 +/* 80005DD0 00001BD4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 80005DD4 00001BD8 3C 60 80 21 */ lis r3, 0x803a +/* 80005DD8 00001BDC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 80005DDC 00001BE0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 80005DE0 00001BE4 38 60 17 00 */ li r3, 0x1700 +/* 80005DE4 00001BE8 4C 00 00 64 */ rfi +/* 80005DE8 00001BEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005DEC 00001BF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005DF0 00001BF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005DF4 00001BF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005DF8 00001BFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005DFC 00001C00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E00 00001C04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E04 00001C08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E08 00001C0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E0C 00001C10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E10 00001C14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E14 00001C18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E18 00001C1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E1C 00001C20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E20 00001C24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E24 00001C28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E28 00001C2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E2C 00001C30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E30 00001C34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E34 00001C38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E38 00001C3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E3C 00001C40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E40 00001C44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E44 00001C48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E48 00001C4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E4C 00001C50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E50 00001C54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E54 00001C58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E58 00001C5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E5C 00001C60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E60 00001C64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E64 00001C68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E68 00001C6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E6C 00001C70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E70 00001C74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E74 00001C78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E78 00001C7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E7C 00001C80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E80 00001C84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E84 00001C88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E88 00001C8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E8C 00001C90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E90 00001C94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E94 00001C98 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E98 00001C9C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005E9C 00001CA0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EA0 00001CA4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EA4 00001CA8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EA8 00001CAC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EAC 00001CB0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EB0 00001CB4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EB4 00001CB8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EB8 00001CBC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EBC 00001CC0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EC0 00001CC4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EC4 00001CC8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EC8 00001CCC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005ECC 00001CD0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005ED0 00001CD4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005ED4 00001CD8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005ED8 00001CDC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EDC 00001CE0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EE0 00001CE4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EE4 00001CE8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EE8 00001CEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EEC 00001CF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EF0 00001CF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EF4 00001CF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EF8 00001CFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005EFC 00001D00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F00 00001D04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F04 00001D08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F08 00001D0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F0C 00001D10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F10 00001D14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F14 00001D18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F18 00001D1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F1C 00001D20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F20 00001D24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F24 00001D28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F28 00001D2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F2C 00001D30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F30 00001D34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F34 00001D38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F38 00001D3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F3C 00001D40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F40 00001D44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F44 00001D48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F48 00001D4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F4C 00001D50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F50 00001D54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F54 00001D58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F58 00001D5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F5C 00001D60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F60 00001D64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F64 00001D68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F68 00001D6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F6C 00001D70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F70 00001D74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F74 00001D78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F78 00001D7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F7C 00001D80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F80 00001D84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F84 00001D88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F88 00001D8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F8C 00001D90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F90 00001D94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F94 00001D98 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F98 00001D9C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005F9C 00001DA0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FA0 00001DA4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FA4 00001DA8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FA8 00001DAC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FAC 00001DB0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FB0 00001DB4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FB4 00001DB8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FB8 00001DBC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FBC 00001DC0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FC0 00001DC4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FC4 00001DC8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FC8 00001DCC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FCC 00001DD0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FD0 00001DD4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FD4 00001DD8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FD8 00001DDC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FDC 00001DE0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FE0 00001DE4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FE4 00001DE8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FE8 00001DEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FEC 00001DF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FF0 00001DF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FF4 00001DF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FF8 00001DFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80005FFC 00001E00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006000 00001E04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006004 00001E08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006008 00001E0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000600C 00001E10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006010 00001E14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006014 00001E18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006018 00001E1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000601C 00001E20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006020 00001E24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006024 00001E28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006028 00001E2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000602C 00001E30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006030 00001E34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006034 00001E38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006038 00001E3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000603C 00001E40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006040 00001E44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006044 00001E48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006048 00001E4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000604C 00001E50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006050 00001E54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006054 00001E58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006058 00001E5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000605C 00001E60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006060 00001E64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006064 00001E68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006068 00001E6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000606C 00001E70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006070 00001E74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006074 00001E78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006078 00001E7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000607C 00001E80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006080 00001E84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006084 00001E88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006088 00001E8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000608C 00001E90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006090 00001E94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006094 00001E98 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006098 00001E9C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000609C 00001EA0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060A0 00001EA4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060A4 00001EA8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060A8 00001EAC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060AC 00001EB0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060B0 00001EB4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060B4 00001EB8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060B8 00001EBC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060BC 00001EC0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060C0 00001EC4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060C4 00001EC8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060C8 00001ECC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060CC 00001ED0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060D0 00001ED4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060D4 00001ED8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060D8 00001EDC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060DC 00001EE0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060E0 00001EE4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060E4 00001EE8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060E8 00001EEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060EC 00001EF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060F0 00001EF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060F4 00001EF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060F8 00001EFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800060FC 00001F00 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006100 00001F04 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006104 00001F08 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006108 00001F0C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000610C 00001F10 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006110 00001F14 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006114 00001F18 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006118 00001F1C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000611C 00001F20 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006120 00001F24 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006124 00001F28 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006128 00001F2C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000612C 00001F30 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006130 00001F34 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006134 00001F38 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006138 00001F3C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000613C 00001F40 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006140 00001F44 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006144 00001F48 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006148 00001F4C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000614C 00001F50 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006150 00001F54 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006154 00001F58 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006158 00001F5C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000615C 00001F60 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006160 00001F64 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006164 00001F68 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006168 00001F6C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000616C 00001F70 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006170 00001F74 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006174 00001F78 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006178 00001F7C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000617C 00001F80 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006180 00001F84 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006184 00001F88 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006188 00001F8C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000618C 00001F90 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006190 00001F94 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006194 00001F98 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006198 00001F9C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000619C 00001FA0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061A0 00001FA4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061A4 00001FA8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061A8 00001FAC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061AC 00001FB0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061B0 00001FB4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061B4 00001FB8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061B8 00001FBC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061BC 00001FC0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061C0 00001FC4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061C4 00001FC8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061C8 00001FCC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061CC 00001FD0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061D0 00001FD4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061D4 00001FD8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061D8 00001FDC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061DC 00001FE0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061E0 00001FE4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061E4 00001FE8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061E8 00001FEC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061EC 00001FF0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061F0 00001FF4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061F4 00001FF8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061F8 00001FFC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800061FC 00002000 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006200 00002004 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006204 00002008 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006208 0000200C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000620C 00002010 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006210 00002014 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006214 00002018 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006218 0000201C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000621C 00002020 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006220 00002024 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006224 00002028 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006228 0000202C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000622C 00002030 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006230 00002034 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006234 00002038 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006238 0000203C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000623C 00002040 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006240 00002044 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006244 00002048 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006248 0000204C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000624C 00002050 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006250 00002054 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006254 00002058 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006258 0000205C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000625C 00002060 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006260 00002064 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006264 00002068 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006268 0000206C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000626C 00002070 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006270 00002074 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006274 00002078 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006278 0000207C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000627C 00002080 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006280 00002084 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006284 00002088 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006288 0000208C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000628C 00002090 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006290 00002094 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006294 00002098 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006298 0000209C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000629C 000020A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800062A0 000020A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800062A4 000020A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800062A8 000020AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800062AC 000020B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800062B0 000020B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800062B4 000020B8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800062B8 000020BC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800062BC 000020C0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800062C0 000020C4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800062C4 000020C8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800062C8 000020CC 7C 60 00 A6 */ mfmsr r3 +/* 800062CC 000020D0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800062D0 000020D4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800062D4 000020D8 3C 60 80 21 */ lis r3, 0x803a +/* 800062D8 000020DC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 800062DC 000020E0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800062E0 000020E4 38 60 1C 00 */ li r3, 0x1c00 +/* 800062E4 000020E8 4C 00 00 64 */ rfi +/* 800062E8 000020EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800062EC 000020F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800062F0 000020F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800062F4 000020F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800062F8 000020FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800062FC 00002100 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006300 00002104 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006304 00002108 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006308 0000210C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000630C 00002110 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006310 00002114 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006314 00002118 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006318 0000211C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000631C 00002120 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006320 00002124 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006324 00002128 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006328 0000212C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000632C 00002130 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006330 00002134 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006334 00002138 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006338 0000213C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000633C 00002140 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006340 00002144 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006344 00002148 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006348 0000214C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000634C 00002150 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006350 00002154 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006354 00002158 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006358 0000215C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000635C 00002160 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006360 00002164 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006364 00002168 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006368 0000216C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000636C 00002170 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006370 00002174 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006374 00002178 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006378 0000217C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000637C 00002180 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006380 00002184 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006384 00002188 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006388 0000218C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000638C 00002190 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006390 00002194 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006394 00002198 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006398 0000219C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000639C 000021A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800063A0 000021A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800063A4 000021A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800063A8 000021AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800063AC 000021B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800063B0 000021B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800063B4 000021B8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800063B8 000021BC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800063BC 000021C0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800063C0 000021C4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800063C4 000021C8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800063C8 000021CC 7C 60 00 A6 */ mfmsr r3 +/* 800063CC 000021D0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800063D0 000021D4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800063D4 000021D8 3C 60 80 21 */ lis r3, 0x803a +/* 800063D8 000021DC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 800063DC 000021E0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800063E0 000021E4 38 60 1D 00 */ li r3, 0x1d00 +/* 800063E4 000021E8 4C 00 00 64 */ rfi +/* 800063E8 000021EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800063EC 000021F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800063F0 000021F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800063F4 000021F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800063F8 000021FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800063FC 00002200 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006400 00002204 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006404 00002208 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006408 0000220C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000640C 00002210 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006410 00002214 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006414 00002218 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006418 0000221C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000641C 00002220 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006420 00002224 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006424 00002228 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006428 0000222C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000642C 00002230 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006430 00002234 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006434 00002238 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006438 0000223C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000643C 00002240 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006440 00002244 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006444 00002248 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006448 0000224C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000644C 00002250 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006450 00002254 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006454 00002258 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006458 0000225C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000645C 00002260 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006460 00002264 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006464 00002268 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006468 0000226C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000646C 00002270 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006470 00002274 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006474 00002278 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006478 0000227C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000647C 00002280 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006480 00002284 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006484 00002288 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006488 0000228C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000648C 00002290 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006490 00002294 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006494 00002298 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006498 0000229C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000649C 000022A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800064A0 000022A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800064A4 000022A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800064A8 000022AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800064AC 000022B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800064B0 000022B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800064B4 000022B8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800064B8 000022BC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800064BC 000022C0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800064C0 000022C4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800064C4 000022C8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800064C8 000022CC 7C 60 00 A6 */ mfmsr r3 +/* 800064CC 000022D0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800064D0 000022D4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800064D4 000022D8 3C 60 80 21 */ lis r3, 0x803a +/* 800064D8 000022DC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 800064DC 000022E0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800064E0 000022E4 38 60 1E 00 */ li r3, 0x1e00 +/* 800064E4 000022E8 4C 00 00 64 */ rfi +/* 800064E8 000022EC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800064EC 000022F0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800064F0 000022F4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800064F4 000022F8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800064F8 000022FC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800064FC 00002300 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006500 00002304 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006504 00002308 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006508 0000230C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000650C 00002310 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006510 00002314 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006514 00002318 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006518 0000231C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000651C 00002320 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006520 00002324 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006524 00002328 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006528 0000232C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000652C 00002330 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006530 00002334 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006534 00002338 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006538 0000233C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000653C 00002340 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006540 00002344 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006544 00002348 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006548 0000234C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000654C 00002350 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006550 00002354 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006554 00002358 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006558 0000235C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000655C 00002360 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006560 00002364 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006564 00002368 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006568 0000236C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000656C 00002370 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006570 00002374 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006574 00002378 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006578 0000237C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000657C 00002380 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006580 00002384 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006584 00002388 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006588 0000238C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000658C 00002390 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006590 00002394 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006594 00002398 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 80006598 0000239C 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 8000659C 000023A0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800065A0 000023A4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800065A4 000023A8 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800065A8 000023AC 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800065AC 000023B0 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800065B0 000023B4 00 00 00 00 */ .4byte 0x00000000 /* unknown instruction */ +/* 800065B4 000023B8 7C 51 43 A6 */ mtspr 0x111, r2 +/* 800065B8 000023BC 7C 72 43 A6 */ mtspr 0x112, r3 +/* 800065BC 000023C0 7C 93 43 A6 */ mtspr 0x113, r4 +/* 800065C0 000023C4 7C 5A 02 A6 */ mfspr r2, 0x1a +/* 800065C4 000023C8 7C 9B 02 A6 */ mfspr r4, 0x1b +/* 800065C8 000023CC 7C 60 00 A6 */ mfmsr r3 +/* 800065CC 000023D0 60 63 00 30 */ ori r3, r3, 0x30 +/* 800065D0 000023D4 7C 7B 03 A6 */ mtspr 0x1b, r3 +/* 800065D4 000023D8 3C 60 80 21 */ lis r3, 0x803a +/* 800065D8 000023DC 60 63 F2 24 */ ori r3, r3, 0xebe4 +/* 800065DC 000023E0 7C 7A 03 A6 */ mtspr 0x1a, r3 +/* 800065E0 000023E4 38 60 1F 00 */ li r3, 0x1f00 +/* 800065E4 000023E8 4C 00 00 64 */ rfi +.global gTRKInterruptVectorTableEnd +gTRKInterruptVectorTableEnd: diff --git a/src/Revolution/OS/__start.c b/src/Revolution/OS/__start.c index b52b47e..fe7d1fa 100644 --- a/src/Revolution/OS/__start.c +++ b/src/Revolution/OS/__start.c @@ -379,54 +379,54 @@ DECL_SECTION(".init") static asm void __init_registers(void) { DECL_SECTION(".init") static asm void __init_data(void) { // clang-format off #ifdef __MWERKS__ - stwu r1,-0x20(r1) - mflr r0 - stw r0,0x24(r1) - stw r31,0x1c(r1) - stw r30,0x18(r1) - stw r29,0x14(r1) - lis r29,_rom_copy_info@ha - addi r29,r29,_rom_copy_info@l -_rom_loop: - lwz r30,8(r29) - cmpwi r30,0 - beq _assign_bss - lwz r4,0(r29) - lwz r31,4(r29) - beq _rom_increment - cmplw r31,r4 - beq _rom_increment - mr r3,r31 - mr r5,r30 - bl memcpy - mr r3,r31 - mr r4,r30 - bl __flush_cache -_rom_increment: - addi r29,r29,0xc - b _rom_loop -_assign_bss: - lis r29,_bss_init_info@ha - addi r29,r29,_bss_init_info@l -_bss_loop: - lwz r5,4(r29) - cmpwi r5,0 - beq _cleanup - lwz r3,0(r29) - beq _bss_increment - li r4,0 - bl memset -_bss_increment: - addi r29,r29,8 - b _bss_loop -_cleanup: - lwz r0,0x24(r1) - lwz r31,0x1c(r1) - lwz r30,0x18(r1) - lwz r29,0x14(r1) - mtlr r0 - addi r1,r1,0x20 - blr + stwu r1,-0x20(r1) + mflr r0 + stw r0,0x24(r1) + stw r31,0x1c(r1) + stw r30,0x18(r1) + stw r29,0x14(r1) + lis r29,_rom_copy_info@ha + addi r29,r29,_rom_copy_info@l + _rom_loop: + lwz r30,8(r29) + cmpwi r30,0 + beq _assign_bss + lwz r4,0(r29) + lwz r31,4(r29) + beq _rom_increment + cmplw r31,r4 + beq _rom_increment + mr r3,r31 + mr r5,r30 + bl memcpy + mr r3,r31 + mr r4,r30 + bl __flush_cache + _rom_increment: + addi r29,r29,0xc + b _rom_loop + _assign_bss: + lis r29,_bss_init_info@ha + addi r29,r29,_bss_init_info@l + _bss_loop: + lwz r5,4(r29) + cmpwi r5,0 + beq _cleanup + lwz r3,0(r29) + beq _bss_increment + li r4,0 + bl memset + _bss_increment: + addi r29,r29,8 + b _bss_loop + _cleanup: + lwz r0,0x24(r1) + lwz r31,0x1c(r1) + lwz r30,0x18(r1) + lwz r29,0x14(r1) + mtlr r0 + addi r1,r1,0x20 + blr #endif // clang-format on } From e2f49ff1dd1765e9c1cb7ea905064c73210e8ac0 Mon Sep 17 00:00:00 2001 From: DeathHound Date: Thu, 23 Apr 2026 16:53:38 +0100 Subject: [PATCH 12/15] Partial match dispatch.c --- config/SALP4Q/splits.txt | 4 ++ config/SALP4Q/symbols.txt | 4 +- configure.py | 1 + src/PowerPC_EABI_Support/MetroTRK/dispatch.c | 45 ++++++++++++++++++++ 4 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 src/PowerPC_EABI_Support/MetroTRK/dispatch.c diff --git a/config/SALP4Q/splits.txt b/config/SALP4Q/splits.txt index 796416d..ee96ead 100644 --- a/config/SALP4Q/splits.txt +++ b/config/SALP4Q/splits.txt @@ -144,6 +144,10 @@ PowerPC_EABI_Support/MetroTRK/main_TRK.c: PowerPC_EABI_Support/MetroTRK/mainloop.c: .text start:0x803AAE1C end:0x803AAF08 +PowerPC_EABI_Support/MetroTRK/dispatch.c: + .text start:0x803AB16C end:0x803AB28C + .data start:0x8052D570 end:0x8052D5DC + PowerPC_EABI_Support/MetroTRK/dolphin_trk.c: .text start:0x803AB28C end:0x803AB5A0 .data start:0x8052D5E0 end:0x8052D61C diff --git a/config/SALP4Q/symbols.txt b/config/SALP4Q/symbols.txt index 32e1d10..f2611c1 100644 --- a/config/SALP4Q/symbols.txt +++ b/config/SALP4Q/symbols.txt @@ -37614,7 +37614,7 @@ TRKGetFreeBuffer = .text:0x803AC830; // type:function size:0x9C TRKGetBuffer = .text:0x803AC8CC; // type:function size:0x24 scope:global TRKReleaseBuffer = .text:0x803AC8F0; // type:function size:0x28 fn_803AC918 = .text:0x803AC918; // type:function size:0x28 -fn_803AC940 = .text:0x803AC940; // type:function size:0x30 +TRKSetBufferPosition = .text:0x803AC940; // type:function size:0x30 fn_803AC970 = .text:0x803AC970; // type:function size:0xA4 fn_803ACA14 = .text:0x803ACA14; // type:function size:0x90 fn_803ACAA4 = .text:0x803ACAA4; // type:function size:0xD0 @@ -46301,7 +46301,7 @@ Si = .data:0x8052D4B0; // type:object size:0x14 scope:local data:4byte Type = .data:0x8052D4C8; // type:object size:0x10 scope:local data:4byte XYNTSC = .data:0x8052D4D8; // type:object size:0x30 scope:local data:byte lbl_8052D508 = .data:0x8052D508; // type:object size:0x68 -jumptable_8052D570 = .data:0x8052D570; // type:object size:0x6C scope:local +gTRKDispatchTable = .data:0x8052D570; // type:object size:0x6C scope:local TRK_ISR_OFFSETS = .data:0x8052D5E0; // type:object size:0x3C scope:local data:4byte @stringBase0 = .data:0x8052D620; // type:object size:0xE1 scope:local data:string_table lbl_8052D708 = .data:0x8052D708; // type:object size:0x1D data:string diff --git a/configure.py b/configure.py index e437f64..65965c3 100644 --- a/configure.py +++ b/configure.py @@ -341,6 +341,7 @@ def MatchingFor(*versions): "progress_category": "sdk", "objects": [ Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/__exception.s"), + Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/dispatch.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/dolphin_trk.c"), Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/flush_cache.c"), Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/main_TRK.c"), diff --git a/src/PowerPC_EABI_Support/MetroTRK/dispatch.c b/src/PowerPC_EABI_Support/MetroTRK/dispatch.c new file mode 100644 index 0000000..c63c8dc --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/dispatch.c @@ -0,0 +1,45 @@ +#include "PowerPC_EABI_Support/MetroTRK/trk.h" + +u32 gTRKDispatchTableSize; + +struct DispatchEntry { + DSError (*fn)(TRKBuffer*); +}; + +struct DispatchEntry gTRKDispatchTable[33] = { + { &TRKDoUnsupported }, { &TRKDoConnect }, { &TRKDoDisconnect }, { &TRKDoReset }, { &TRKDoVersions }, + { &TRKDoSupportMask }, { &TRKDoCPUType }, { &TRKDoUnsupported }, { &TRKDoUnsupported }, { &TRKDoUnsupported }, + { &TRKDoUnsupported }, { &TRKDoUnsupported }, { &TRKDoUnsupported }, { &TRKDoUnsupported }, { &TRKDoUnsupported }, + { &TRKDoUnsupported }, { &TRKDoReadMemory }, { &TRKDoWriteMemory }, { &TRKDoReadRegisters }, { &TRKDoWriteRegisters }, + { &TRKDoUnsupported }, { &TRKDoUnsupported }, { &TRKDoFlushCache }, { &TRKDoUnsupported }, { &TRKDoContinue }, + { &TRKDoStep }, { &TRKDoStop }, { &TRKDoUnsupported }, { &TRKDoUnsupported }, { &TRKDoUnsupported }, + { &TRKDoUnsupported }, { &TRKDoUnsupported }, +}; + +DSError TRKInitializeDispatcher() +{ + gTRKDispatchTableSize = 32; + return DS_NoError; +} + + +DSError TRKOverrideDispatch(TRKBuffer* buffer) +{ + return DS_NoError; +} + + +DSError TRKDispatchMessage(TRKBuffer* buffer) +{ + DSError error; + u8 command; + + error = DS_DispatchError; + TRKSetBufferPosition(buffer, 0); + TRKReadBuffer1_ui8(buffer, &command); + command &= 0xFF; + if (command < gTRKDispatchTableSize) { + error = gTRKDispatchTable[command].fn(buffer); + } + return error; +} From 07e15ad2a759a933c83b70a9caad99b2b5fa1708 Mon Sep 17 00:00:00 2001 From: DeathHound Date: Fri, 24 Apr 2026 17:40:13 +0100 Subject: [PATCH 13/15] Partial match dolphin_trk_glue.c --- config/SALP4Q/splits.txt | 4 + config/SALP4Q/symbols.txt | 4 +- configure.py | 1 + .../MetroTRK/dolphin_trk_glue.c | 229 ++++++++++++++++++ src/Revolution/DB.h | 2 +- 5 files changed, 237 insertions(+), 3 deletions(-) create mode 100644 src/PowerPC_EABI_Support/MetroTRK/dolphin_trk_glue.c diff --git a/config/SALP4Q/splits.txt b/config/SALP4Q/splits.txt index ee96ead..8640a52 100644 --- a/config/SALP4Q/splits.txt +++ b/config/SALP4Q/splits.txt @@ -153,6 +153,10 @@ PowerPC_EABI_Support/MetroTRK/dolphin_trk.c: .data start:0x8052D5E0 end:0x8052D61C .sbss start:0x805F5EA0 end:0x805F5EA8 +PowerPC_EABI_Support/MetroTRK/dolphin_trk_glue.c: + .text start:0x803AB5B0 end:0x803AB8F8 + .bss start:0x805A2820 end:0x805A2848 + PowerPC_EABI_Support/MetroTRK/nubevent.c: .text start:0x803AB9DC end:0x803ABB78 .bss start:0x805A2848 end:0x805A2870 diff --git a/config/SALP4Q/symbols.txt b/config/SALP4Q/symbols.txt index f2611c1..c5d594a 100644 --- a/config/SALP4Q/symbols.txt +++ b/config/SALP4Q/symbols.txt @@ -37578,8 +37578,8 @@ TRKUARTInterruptHandler = .text:0x803AB7A8; // type:function size:0x4 scope:glob TRKInitializeIntDrivenUART = .text:0x803AB7AC; // type:function size:0x54 scope:global EnableEXI2Interrupts = .text:0x803AB800; // type:function size:0x2C TRKPollUART = .text:0x803AB82C; // type:function size:0x14 -fn_803AB840 = .text:0x803AB840; // type:function size:0x3C -fn_803AB87C = .text:0x803AB87C; // type:function size:0x3C +TRKReadUARTN = .text:0x803AB840; // type:function size:0x3C +TRKWriteUARTN = .text:0x803AB87C; // type:function size:0x3C ReserveEXI2Port = .text:0x803AB8B8; // type:function size:0x14 scope:global UnreserveEXI2Port = .text:0x803AB8CC; // type:function size:0x14 scope:global TRK_board_display = .text:0x803AB8E0; // type:function size:0x18 scope:global diff --git a/configure.py b/configure.py index 65965c3..a6b3abb 100644 --- a/configure.py +++ b/configure.py @@ -343,6 +343,7 @@ def MatchingFor(*versions): Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/__exception.s"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/dispatch.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/dolphin_trk.c"), + Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/dolphin_trk_glue.c"), Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/flush_cache.c"), Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/main_TRK.c"), Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/mainloop.c"), diff --git a/src/PowerPC_EABI_Support/MetroTRK/dolphin_trk_glue.c b/src/PowerPC_EABI_Support/MetroTRK/dolphin_trk_glue.c new file mode 100644 index 0000000..e3c2886 --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/dolphin_trk_glue.c @@ -0,0 +1,229 @@ +#include "Revolution/DB.h" // IWYU pragma: keep +#include "PowerPC_EABI_Support/MetroTRK/trk.h" +#include "PowerPC_EABI_Support/MSL/MSL_C/stddef.h" // IWYU pragma: keep + +#define BUFF_LEN 4362 + +u8 gWriteBuf[BUFF_LEN]; +u8 gReadBuf[BUFF_LEN]; +s32 _MetroTRK_Has_Framing; +s32 gReadCount; +s32 gReadPos; +s32 gWritePos; + +DBCommTable gDBCommTable = { NULL, NULL, NULL, NULL, NULL, NULL, NULL }; + +asm void TRKLoadContext(struct OSContext* ctx, u32 a) +{ + #ifdef __MWERKS__ // clang-format off + lwz r0, 0(r3) + lwz r1, 4(r3) + lwz r2, 8(r3) + lwz r5, 0x1A2(r3) + rlwinm. r6, r5, 0, 30, 30 + beq L1 + rlwinm r5, r5, 0, 31, 29 + sth r5, 0x1A2(r3) + lmw r5, 0x14(r3) + b L2 + L1: + lmw r13, 0x34(r3) + L2: + mr r31, r3 + mr r3, r4 + lwz r4, 0x80(r31) + mtcrf 255, r4 + lwz r4, 0x84(r31) + mtlr r4 + lwz r4, 0x88(r31) + mtctr r4 + lwz r4, 0x8C(r31) + mtxer r4 + mfmsr r4 + rlwinm r4, r4, 0, 17, 15 + rlwinm r4, r4, 0, 31, 29 + mtmsr r4 + mtsprg 1, r2 + lwz r4, 0xC(r31) + mtsprg 2, r4 + lwz r4, 0x10(r31) + mtsprg 3, r4 + lwz r2, 0x198(r31) + lwz r4, 0x19C(r31) + lwz r31, 0x7C(r31) + b TRKInterruptHandler + #endif // clang-format on +} + +/** + * @TODO: Documentation + */ +void TRKEXICallBack(OSInterruptType param_0, struct OSContext* ctx) +{ + OSEnableScheduler(); + TRKLoadContext(ctx, 0x500); +} + +/** + * @TODO: Documentation + */ +int InitMetroTRKCommTable(int hwId) +{ + int result; + + if (hwId == HARDWARE_GDEV) { + result = Hu_IsStub(); + + // gDBCommTable.initialize_func = (DBCommInitFunc)DBInitComm; + // gDBCommTable.init_interrupts_func = (DBCommFunc)DBInitInterrupts; + // gDBCommTable.peek_func = (DBCommFunc)DBQueryData; + // gDBCommTable.read_func = (DBCommReadFunc)DBRead; + // gDBCommTable.write_func = (DBCommWriteFunc)DBWrite; + // gDBCommTable.open_func = (DBCommFunc)DBOpen; + // gDBCommTable.close_func = (DBCommFunc)DBClose; + } else { + result = AMC_IsStub(); + + // gDBCommTable.initialize_func = (DBCommInitFunc)EXI2_Init; + // gDBCommTable.init_interrupts_func = (DBCommFunc)EXI2_EnableInterrupts; + // gDBCommTable.peek_func = (DBCommFunc)EXI2_Poll; + // gDBCommTable.read_func = (DBCommReadFunc)EXI2_ReadN; + // gDBCommTable.write_func = (DBCommWriteFunc)EXI2_WriteN; + // gDBCommTable.open_func = (DBCommFunc)EXI2_Reserve; + // gDBCommTable.close_func = (DBCommFunc)EXI2_Unreserve; + } + + return result; +} + +/** + * @TODO: Documentation + */ +void TRKUARTInterruptHandler(void) +{ +} + +/** + * @TODO: Documentation + */ +DSError TRKInitializeIntDrivenUART(u32 param_0, u32 param_1, u32 param_2, volatile u8** param_3) +{ + // gDBCommTable.initialize_func(param_3, TRKEXICallBack); + return DS_NoError; +} + +/** + * @TODO: Documentation + */ +void EnableEXI2Interrupts(void) +{ + gDBCommTable.init_interrupts_func(); +} + +/** + * @TODO: Documentation + */ +int TRKPollUART(void) +{ + return gDBCommTable.peek_func(); +} + +/** + * @TODO: Documentation + */ +UARTError TRKReadUARTN(void* bytes, u32 length) +{ + int readErr = gDBCommTable.read_func(bytes, length); + return readErr == 0 ? 0 : -1; +} + +/** + * @TODO: Documentation + */ +UARTError TRKWriteUARTN(const void* bytes, u32 length) +{ + int writeErr = gDBCommTable.write_func(bytes, length); + return writeErr == 0 ? 0 : -1; +} + +/** + * @TODO: Documentation + * @note UNUSED Size: 000050 + */ +UARTError WriteUARTFlush(void) +{ + UARTError readErr = 0; + + while (gWritePos < 0x800) { + gWriteBuf[gWritePos] = 0; + gWritePos++; + } + if (gWritePos != 0) { + readErr = TRKWriteUARTN(gWriteBuf, gWritePos); + gWritePos = 0; + } + return readErr; +} + +/** + * @TODO: Documentation + * @note UNUSED Size: 00002C + */ +UARTError WriteUART1(u8 arg0) +{ + gWriteBuf[gWritePos++] = arg0; + return 0; +} + +/** + * @TODO: Documentation + * @note UNUSED Size: 0000F8 + */ +UARTError TRKReadUARTPoll(u8* arg0) +{ + UARTError readErr = 4; + s32 cnt; + + if (gReadPos >= gReadCount) { + gReadPos = 0; + cnt = gReadCount = TRKPollUART(); + if (cnt > 0) { + if (cnt > BUFF_LEN) { + gReadCount = BUFF_LEN; + } + readErr = TRKReadUARTN(gReadBuf, gReadCount); + if (readErr != 0) { + gReadCount = 0; + } + } + } + if (gReadPos < gReadCount) { + *arg0 = gReadBuf[gReadPos++]; + readErr = 0; + } + return readErr; +} + +/** + * @TODO: Documentation + */ +void ReserveEXI2Port(void) +{ + gDBCommTable.open_func(); +} + +/** + * @TODO: Documentation + */ +void UnreserveEXI2Port(void) +{ + gDBCommTable.close_func(); +} + +/** + * @TODO: Documentation + */ +void TRK_board_display(const char* str) +{ + OSReport(str); +} diff --git a/src/Revolution/DB.h b/src/Revolution/DB.h index df444dd..f8a1283 100644 --- a/src/Revolution/DB.h +++ b/src/Revolution/DB.h @@ -4,7 +4,7 @@ extern "C" { #endif - #include "Revolution/DB/db.h" + #include "Revolution/DB/db.h" // IWYU pragma: export #ifdef __cplusplus } From c01237d8bb33398f4e4b7fb325e53a1d92d4a7fb Mon Sep 17 00:00:00 2001 From: DeathHound Date: Fri, 24 Apr 2026 18:17:16 +0100 Subject: [PATCH 14/15] Partial match mem_TRK.c --- config/SALP4Q/splits.txt | 3 + config/SALP4Q/symbols.txt | 2 +- configure.py | 1 + src/PowerPC_EABI_Support/MetroTRK/mem_TRK.c | 86 +++++++++++++++++++++ 4 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 src/PowerPC_EABI_Support/MetroTRK/mem_TRK.c diff --git a/config/SALP4Q/splits.txt b/config/SALP4Q/splits.txt index 8640a52..c29c268 100644 --- a/config/SALP4Q/splits.txt +++ b/config/SALP4Q/splits.txt @@ -144,6 +144,9 @@ PowerPC_EABI_Support/MetroTRK/main_TRK.c: PowerPC_EABI_Support/MetroTRK/mainloop.c: .text start:0x803AAE1C end:0x803AAF08 +PowerPC_EABI_Support/MetroTRK/mem_TRK.c: + .text start:0x803AAF08 end:0x803AB16C + PowerPC_EABI_Support/MetroTRK/dispatch.c: .text start:0x803AB16C end:0x803AB28C .data start:0x8052D570 end:0x8052D5DC diff --git a/config/SALP4Q/symbols.txt b/config/SALP4Q/symbols.txt index c5d594a..9e1c54e 100644 --- a/config/SALP4Q/symbols.txt +++ b/config/SALP4Q/symbols.txt @@ -37562,7 +37562,7 @@ TRK_flush_cache = .text:0x803AADA8; // type:function size:0x38 TRK_main = .text:0x803AADE0; // type:function size:0x3C scope:global TRKNubMainLoop = .text:0x803AAE1C; // type:function size:0xEC scope:global TRK_memcpy = .text:0x803AAF08; // type:function size:0x13C -fn_803AB044 = .text:0x803AB044; // type:function size:0x128 +TRK_fill_mem = .text:0x803AB044; // type:function size:0x128 TRKDispatchMessage = .text:0x803AB16C; // type:function size:0x120 scope:global InitMetroTRK = .text:0x803AB28C; // type:function size:0x94 scope:global InitMetroTRK_BBA = .text:0x803AB324; // type:function size:0x94 scope:global diff --git a/configure.py b/configure.py index a6b3abb..781e1eb 100644 --- a/configure.py +++ b/configure.py @@ -347,6 +347,7 @@ def MatchingFor(*versions): Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/flush_cache.c"), Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/main_TRK.c"), Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/mainloop.c"), + Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/mem_TRK.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/mpc_7xx_603e.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/nubevent.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/nubinit.c"), diff --git a/src/PowerPC_EABI_Support/MetroTRK/mem_TRK.c b/src/PowerPC_EABI_Support/MetroTRK/mem_TRK.c new file mode 100644 index 0000000..02197e6 --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/mem_TRK.c @@ -0,0 +1,86 @@ +#include "PowerPC_EABI_Support/MetroTRK/trk.h" +#include "PowerPC_EABI_Support/MSL/MSL_C/stddef.h" // IWYU pragma: keep + +static void TRK_fill_mem(void* dest, int val, size_t count); + +void* TRK_memcpy(void* dest, const void* src, size_t count) +{ + u8* s = (u8*)src - 1; + u8* d = (u8*)dest - 1; + + count++; + + while (--count) { + *++d = *++s; + } +} + +void* TRK_memset(void* dest, int val, size_t count) +{ + TRK_fill_mem(dest, val, count); + return dest; +} + +static void TRK_fill_mem(void* dest, int value, size_t length) +{ +#define cDest ((u8*)dest) +#define lDest ((u32*)dest) + u32 val = (u8)value; + u32 i; + lDest = (u32*)dest; + cDest = (u8*)dest; + + cDest--; + + if (length >= 32) { + i = ~(u32)dest & 3; + + if (i) { + length -= i; + do { + *++cDest = val; + } while (--i); + } + + if (val) { + val |= val << 24 | val << 16 | val << 8; + } + + lDest = (u32*)(cDest + 1) - 1; + + i = length >> 5; + if (i) { + do { + *++lDest = val; + *++lDest = val; + *++lDest = val; + *++lDest = val; + *++lDest = val; + *++lDest = val; + *++lDest = val; + *++lDest = val; + } while (--i); + } + + i = (length & 31) >> 2; + + if (i) { + do { + *++lDest = val; + } while (--i); + } + + cDest = (u8*)(lDest + 1) - 1; + + length &= 3; + } + + if (length) { + do { + *++cDest = val; + } while (--length); + } + +#undef cDest +#undef lDest +} From c4c8afa9ae8e6690241a3cf86715fb83079d35bf Mon Sep 17 00:00:00 2001 From: DeathHound Date: Fri, 24 Apr 2026 19:48:31 +0100 Subject: [PATCH 15/15] Partial match msgbuf.c --- config/SALP4Q/splits.txt | 4 + config/SALP4Q/symbols.txt | 14 +- configure.py | 1 + src/PowerPC_EABI_Support/MetroTRK/msgbuf.c | 474 +++++++++++++++++++++ 4 files changed, 486 insertions(+), 7 deletions(-) create mode 100644 src/PowerPC_EABI_Support/MetroTRK/msgbuf.c diff --git a/config/SALP4Q/splits.txt b/config/SALP4Q/splits.txt index c29c268..16cd08b 100644 --- a/config/SALP4Q/splits.txt +++ b/config/SALP4Q/splits.txt @@ -178,6 +178,10 @@ PowerPC_EABI_Support/MetroTRK/targcont.c: PowerPC_EABI_Support/MetroTRK/mpc_7xx_603e.c: .text start:0x803AC484 end:0x803AC7AC +PowerPC_EABI_Support/MetroTRK/msgbuf.c: + .text start:0x803AC7AC end:0x803AD01C + .bss start:0x805A2870 end:0x805A4218 + PowerPC_EABI_Support/MetroTRK/targimpl.c: .text start:0x803AE3B8 end:0x803AEBE4 .rodata start:0x804E40D8 end:0x804E40E8 diff --git a/config/SALP4Q/symbols.txt b/config/SALP4Q/symbols.txt index 9e1c54e..eaea083 100644 --- a/config/SALP4Q/symbols.txt +++ b/config/SALP4Q/symbols.txt @@ -37613,16 +37613,16 @@ TRKInitializeMessageBuffers = .text:0x803AC810; // type:function size:0x20 scope TRKGetFreeBuffer = .text:0x803AC830; // type:function size:0x9C TRKGetBuffer = .text:0x803AC8CC; // type:function size:0x24 scope:global TRKReleaseBuffer = .text:0x803AC8F0; // type:function size:0x28 -fn_803AC918 = .text:0x803AC918; // type:function size:0x28 +TRKResetBuffer = .text:0x803AC918; // type:function size:0x28 TRKSetBufferPosition = .text:0x803AC940; // type:function size:0x30 -fn_803AC970 = .text:0x803AC970; // type:function size:0xA4 -fn_803ACA14 = .text:0x803ACA14; // type:function size:0x90 -fn_803ACAA4 = .text:0x803ACAA4; // type:function size:0xD0 +TRKAppendBuffer = .text:0x803AC970; // type:function size:0xA4 +TRKReadBuffer = .text:0x803ACA14; // type:function size:0x90 +TRKAppendBuffer1_ui32 = .text:0x803ACAA4; // type:function size:0xD0 TRKAppendBuffer1_ui64 = .text:0x803ACB74; // type:function size:0xF4 -fn_803ACC68 = .text:0x803ACC68; // type:function size:0x64 +TRKAppendBuffer_ui8 = .text:0x803ACC68; // type:function size:0x64 TRKAppendBuffer_ui32 = .text:0x803ACCCC; // type:function size:0xF0 TRKReadBuffer1_ui64 = .text:0x803ACDBC; // type:function size:0xE0 -fn_803ACE9C = .text:0x803ACE9C; // type:function size:0x98 +TRKReadBuffer_ui8 = .text:0x803ACE9C; // type:function size:0x98 TRKReadBuffer_ui32 = .text:0x803ACF34; // type:function size:0xE8 fn_803AD01C = .text:0x803AD01C; // type:function size:0x8 fn_803AD024 = .text:0x803AD024; // type:function size:0x70 @@ -48254,7 +48254,7 @@ lbl_805A2300 = .bss:0x805A2300; // type:object size:0x500 lbl_805A2800 = .bss:0x805A2800; // type:object size:0x20 gDBCommTable = .bss:0x805A2820; // type:object size:0x28 scope:global data:4byte gTRKEventQueue = .bss:0x805A2848; // type:object size:0x28 data:4byte -lbl_805A2870 = .bss:0x805A2870; // type:object size:0x19A8 data:4byte +gTRKMsgBufs = .bss:0x805A2870; // type:object size:0x19A8 data:4byte gTRKRestoreFlags = .bss:0x805A4218; // type:object size:0x9 scope:global data:byte gTRKStepStatus = .bss:0x805A4228; // type:object size:0x14 scope:global data:4byte gTRKSaveState = .bss:0x805A4240; // type:object size:0x94 scope:global data:4byte diff --git a/configure.py b/configure.py index 781e1eb..3f65834 100644 --- a/configure.py +++ b/configure.py @@ -349,6 +349,7 @@ def MatchingFor(*versions): Object(MatchingFor("SALP4Q"), "PowerPC_EABI_Support/MetroTRK/mainloop.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/mem_TRK.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/mpc_7xx_603e.c"), + Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/msgbuf.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/nubevent.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/nubinit.c"), Object(MatchingFor(), "PowerPC_EABI_Support/MetroTRK/serpoll.c"), diff --git a/src/PowerPC_EABI_Support/MetroTRK/msgbuf.c b/src/PowerPC_EABI_Support/MetroTRK/msgbuf.c new file mode 100644 index 0000000..f022a00 --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/msgbuf.c @@ -0,0 +1,474 @@ +#include "PowerPC_EABI_Support/MetroTRK/trk.h" +#include "PowerPC_EABI_Support/MSL/MSL_C/stddef.h" // IWYU pragma: keep + +TRKBuffer gTRKMsgBufs[3]; + +/** + * @TODO: Documentation + */ +static void TRKSetBufferUsed(TRKBuffer* msg, BOOL state) +{ + msg->isInUse = state; +} + +/** + * @TODO: Documentation + */ +DSError TRKInitializeMessageBuffers(void) +{ + int i; + for (i = 0; i < 3; i++) { + TRKInitializeMutex(&gTRKMsgBufs[i]); + TRKAcquireMutex(&gTRKMsgBufs[i]); + TRKSetBufferUsed(&gTRKMsgBufs[i], FALSE); + TRKReleaseMutex(&gTRKMsgBufs[i]); + } + + return DS_NoError; +} + +/** + * @TODO: Documentation + */ +DSError TRKGetFreeBuffer(int* msgID, TRKBuffer** outMsg) +{ + DSError error = DS_NoMessageBufferAvailable; + int i; + *outMsg = NULL; + + for (i = 0; i < 3; i++) { + TRKBuffer* buf = TRKGetBuffer(i); + + TRKAcquireMutex(buf); + if (!buf->isInUse) { + TRKResetBuffer(buf, 1); + TRKSetBufferUsed(buf, TRUE); + error = DS_NoError; + *outMsg = buf; + *msgID = i; + i = 3; // why not break? weird choice + } + TRKReleaseMutex(buf); + } + + return error; +} + +/** + * @TODO: Documentation + */ +void* TRKGetBuffer(int idx) +{ + TRKBuffer* buf = NULL; + if (idx >= 0 && idx < 3) { + buf = &gTRKMsgBufs[idx]; + } + + return buf; +} + +/** + * @TODO: Documentation + */ +void TRKReleaseBuffer(int idx) +{ + TRKBuffer* msg; + if (idx != -1 && idx >= 0 && idx < 3) { + msg = &gTRKMsgBufs[idx]; + TRKAcquireMutex(msg); + TRKSetBufferUsed(msg, FALSE); + TRKReleaseMutex(msg); + } +} + +/** + * @TODO: Documentation + */ +void TRKResetBuffer(TRKBuffer* msg, u8 keepData) +{ + msg->length = 0; + msg->position = 0; + + if (!keepData) { + TRK_memset(msg->data, 0, TRKMSGBUF_SIZE); + } +} + +/** + * @TODO: Documentation + */ +DSError TRKSetBufferPosition(TRKBuffer* msg, u32 pos) +{ + DSError error = DS_NoError; + + if (pos > 0x880) { + error = DS_MessageBufferOverflow; + } else { + msg->position = pos; + // If the new position is past the current length, + // update the length + if (pos > msg->length) { + msg->length = pos; + } + } + + return error; +} + +/** + * @TODO: Documentation + */ +#pragma dont_inline on + +DSError TRKAppendBuffer(TRKBuffer* msg, const void* data, size_t length) +{ + DSError error = DS_NoError; // r31 + u32 bytesLeft; + + // Return if no bytes to append + if (length == 0) { + return DS_NoError; + } + + bytesLeft = 0x880 - msg->position; + + // If there isn't enough space left in the buffer, change the number + // of bytes to append to the remaning number of bytes + if (bytesLeft < length) { + error = DS_MessageBufferOverflow; + length = bytesLeft; + } + + if (length == 1) { + // If the length of bytes to append is 1, just copy the byte over + msg->data[msg->position] = ((u8*)data)[0]; + } else { + // Otherwise, use memcpy + TRK_memcpy(msg->data + msg->position, data, length); + } + + // Update the position and length + msg->position += length; + msg->length = msg->position; + + return error; +} + +#pragma dont_inline reset + +/** + * @TODO: Documentation + */ +DSError TRKReadBuffer(TRKBuffer* msg, void* data, size_t length) +{ + DSError error = DS_NoError; + unsigned int bytesLeft; // this has to be unsigned int not u32 to match lmfao. + + // Return if no bytes to read + if (length == 0) { + return DS_NoError; + } + + bytesLeft = msg->length - msg->position; + + // If the number of bytes to read exceeds the buffer length, change + // the length to the remaining number of bytes + if (length > bytesLeft) { + error = DS_MessageBufferReadError; + length = bytesLeft; + } + + TRK_memcpy(data, msg->data + msg->position, length); + msg->position += length; + return error; +} + +/** + * @TODO: Documentation + */ +DSError TRKAppendBuffer1_ui16(TRKBuffer* buffer, const u16 data) +{ + u8* bigEndianData; + u8* byteData; + u8 swapBuffer[sizeof(data)]; + + if (gTRKBigEndian) { + bigEndianData = (u8*)&data; + } else { + byteData = (u8*)&data; + bigEndianData = swapBuffer; + + bigEndianData[0] = byteData[1]; + bigEndianData[1] = byteData[0]; + } + + return TRKAppendBuffer(buffer, (const void*)bigEndianData, sizeof(data)); +} + +/** + * @TODO: Documentation + */ +DSError TRKAppendBuffer1_ui32(TRKBuffer* buffer, const u32 data) +{ + u8* bigEndianData; + u8* byteData; + u8 swapBuffer[sizeof(data)]; + + if (gTRKBigEndian) { + bigEndianData = (u8*)&data; + } else { + byteData = (u8*)&data; + bigEndianData = swapBuffer; + + bigEndianData[0] = byteData[3]; + bigEndianData[1] = byteData[2]; + bigEndianData[2] = byteData[1]; + bigEndianData[3] = byteData[0]; + } + + return TRKAppendBuffer(buffer, (const void*)bigEndianData, sizeof(data)); +} + +/** + * @TODO: Documentation + */ +DSError TRKAppendBuffer1_ui64(TRKBuffer* buffer, const u64 data) +{ + u8* bigEndianData; + u8* byteData; + u8 swapBuffer[sizeof(data)]; + if (gTRKBigEndian) { + bigEndianData = (u8*)&data; + } else { + byteData = (u8*)&data; + bigEndianData = swapBuffer; + + bigEndianData[0] = byteData[7]; + bigEndianData[1] = byteData[6]; + bigEndianData[2] = byteData[5]; + bigEndianData[3] = byteData[4]; + bigEndianData[4] = byteData[3]; + bigEndianData[5] = byteData[2]; + bigEndianData[6] = byteData[1]; + bigEndianData[7] = byteData[0]; + } + + return TRKAppendBuffer(buffer, (const void*)bigEndianData, sizeof(data)); +} + +/** + * @TODO: Documentation + * @note UNUSED Size: 0000C4 + */ +void TRKAppendBuffer1_ui128(void) +{ + // UNUSED FUNCTION +} + +/** + * @TODO: Documentation + */ +DSError TRKAppendBuffer_ui8(TRKBuffer* buffer, const u8* data, int count) +{ + DSError err; + int i; + + for (i = 0, err = DS_NoError; err == DS_NoError && i < count; i++) { + err = TRKAppendBuffer1_ui8(buffer, data[i]); + } + + return err; +} + +/** + * @TODO: Documentation + * @note UNUSED Size: 00007C + */ +void TRKAppendBuffer_ui16(void) +{ + // UNUSED FUNCTION +} + +/** + * @TODO: Documentation + */ +DSError TRKAppendBuffer_ui32(TRKBuffer* buffer, const u32* data, int count) +{ + DSError err; + int i; + + for (i = 0, err = DS_NoError; err == DS_NoError && i < count; i++) { + err = TRKAppendBuffer1_ui32(buffer, data[i]); + } + + return err; +} + +/** + * @TODO: Documentation + * @note UNUSED Size: 000080 + */ +void TRKAppendBuffer_ui64(void) +{ + // UNUSED FUNCTION +} + +/** + * @TODO: Documentation + * @note UNUSED Size: 00007C + */ +void TRKAppendBuffer_ui128(void) +{ + // UNUSED FUNCTION +} + +/** + * @TODO: Documentation + */ +DSError TRKReadBuffer1_ui8(TRKBuffer* buffer, u8* data) +{ + return TRKReadBuffer(buffer, (void*)data, 1); +} + +/** + * @TODO: Documentation + */ +DSError TRKReadBuffer1_ui16(TRKBuffer* buffer, u16* data) +{ + DSError err; + + u8* bigEndianData; + u8* byteData; + u8 swapBuffer[sizeof(data)]; + + if (gTRKBigEndian) { + bigEndianData = (u8*)data; + } else { + bigEndianData = swapBuffer; + } + + err = TRKReadBuffer(buffer, (void*)bigEndianData, sizeof(*data)); + + if (!gTRKBigEndian && err == DS_NoError) { + byteData = (u8*)data; + + byteData[0] = bigEndianData[1]; + byteData[1] = bigEndianData[0]; + } + + return err; +} + +/** + * @TODO: Documentation + */ +DSError TRKReadBuffer1_ui32(TRKBuffer* buffer, u32* data) +{ + DSError err; + + u8* bigEndianData; + u8* byteData; + u8 swapBuffer[sizeof(data)]; + + if (gTRKBigEndian) { + bigEndianData = (u8*)data; + } else { + bigEndianData = swapBuffer; + } + + err = TRKReadBuffer(buffer, (void*)bigEndianData, sizeof(*data)); + + if (!gTRKBigEndian && err == DS_NoError) { + byteData = (u8*)data; + + byteData[0] = bigEndianData[3]; + byteData[1] = bigEndianData[2]; + byteData[2] = bigEndianData[1]; + byteData[3] = bigEndianData[0]; + } + + return err; +} + +/** + * @TODO: Documentation + */ +DSError TRKReadBuffer1_ui64(TRKBuffer* buffer, u64* data) +{ + DSError err; + + u8* bigEndianData; + u8* byteData; + u8 swapBuffer[sizeof(data)]; + + if (gTRKBigEndian) { + bigEndianData = (u8*)data; + } else { + bigEndianData = swapBuffer; + } + + err = TRKReadBuffer(buffer, (void*)bigEndianData, sizeof(*data)); + + if (!gTRKBigEndian && err == 0) { + byteData = (u8*)data; + + byteData[0] = bigEndianData[7]; + byteData[1] = bigEndianData[6]; + byteData[2] = bigEndianData[5]; + byteData[3] = bigEndianData[4]; + byteData[4] = bigEndianData[3]; + byteData[5] = bigEndianData[2]; + byteData[6] = bigEndianData[1]; + byteData[7] = bigEndianData[0]; + } + + return err; +} + +/** + * @TODO: Documentation + * @note UNUSED Size: 0000F0 + */ +void TRKReadBuffer1_ui128(void) +{ + // UNUSED FUNCTION +} + +/** + * @TODO: Documentation + */ +DSError TRKReadBuffer_ui8(TRKBuffer* buffer, u8* data, int count) +{ + DSError err; + int i; + + for (i = 0, err = DS_NoError; err == DS_NoError && i < count; i++) { + err = TRKReadBuffer1_ui8(buffer, &(data[i])); + } + + return err; +} + +/** + * @TODO: Documentation + * @note UNUSED Size: 00007C + */ +void TRKReadBuffer_ui16(void) +{ + // UNUSED FUNCTION +} + +/** + * @TODO: Documentation + */ +DSError TRKReadBuffer_ui32(TRKBuffer* buffer, u32* data, int count) +{ + DSError err; + s32 i; + + for (i = 0, err = DS_NoError; err == DS_NoError && i < count; i++) { + err = TRKReadBuffer1_ui32(buffer, &(data[i])); + } + + return err; +}